Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCommitment ¶
DeleteCommitment deletes a single commitment using the commitment ID
func DeleteLeave ¶
DeleteLeave deletes a single leave using the leave ID
Types ¶
type Commitment ¶
type Commitment struct { ID uuid.UUID `json:"id"` EmployeeID uuid.UUID `json:"employee_id" db:"employee_id"` EmployeeName string `json:"employee_name" db:"employee_name"` TimeperiodID uuid.UUID `json:"timeperiod_id" db:"timeperiod_id"` TimeperiodName string `json:"timeperiod_name" db:"timeperiod_name"` ProjectID uuid.UUID `json:"project_id" db:"project_id"` ProjectName string `json:"project_name" db:"project_name"` Days int `json:"days"` Cost float32 `json:"cost"` }
Commitment is a number of days for a single employee, timeperiod, and project
func CreateCommitment ¶
func CreateCommitment(db *sqlx.DB, commitment *Commitment) (*Commitment, error)
func GetCommitment ¶
func ListCommitments ¶
func ListCommitments(db *sqlx.DB) ([]Commitment, error)
type Employee ¶
type Leave ¶
type Leave struct { ID uuid.UUID `json:"id"` EmployeeID uuid.UUID `json:"employee_id" db:"employee_id"` EmployeeName string `json:"employee_name" db:"employee_name"` TimeperiodID uuid.UUID `json:"timeperiod_id" db:"timeperiod_id"` TimeperiodName string `json:"timeperiod_name" db:"timeperiod_name"` Days int `json:"days"` }
Leave is a number of days for a single employee, timeperiod, and project
type Project ¶
type Project struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Funding *float32 `json:"funding,omitempty"` FundsRemaining *float32 `json:"funds_remaining" db:"funds_remaining"` LatestRealityCheck *time.Time `json:"latest_reality_check" db:"latest_reality_check"` FeedbackEnabled *bool `json:"feedback_enabled,omitempty" db:"feedback_enabled"` }
type ProjectFundingUpdate ¶
type ProjectFundingUpdate struct { ID uuid.UUID `json:"id"` ProjectID uuid.UUID `json:"project_id" db:"project_id"` TimeperiodID uuid.UUID `json:"timeperiod_id" db:"timeperiod_id"` Total float32 `json:"total" db:"total"` }
func UpdateProjectFunding ¶
func UpdateProjectFunding(db *sqlx.DB, u *ProjectFundingUpdate) (*ProjectFundingUpdate, error)
type Timeperiod ¶
type Timeperiod struct { ID uuid.UUID `json:"id"` Name string `json:"name"` End time.Time `json:"timeperiod_end" db:"timeperiod_end"` Workdays int `json:"workdays"` }
func ListTimeperiods ¶
func ListTimeperiods(db *sqlx.DB) ([]Timeperiod, error)
Click to show internal directories.
Click to hide internal directories.