Documentation ¶
Index ¶
- func DeleteOneEmployee(ctx context.Context, db *mongo.Database, companyID primitive.ObjectID, ...) (*mongo.DeleteResult, error)
- func FindManyEmployees(ctx context.Context, db *mongo.Database, companyID primitive.ObjectID, ...) (*mongo.Cursor, error)
- func FindManyTimeFrames(ctx context.Context, db *mongo.Database, companyID primitive.ObjectID, ...) (*mongo.Cursor, error)
- func FindOneEmployee(ctx context.Context, db *mongo.Database, companyID primitive.ObjectID, ...) *mongo.SingleResult
- type Employee
- type EmployeeUpdate
- type TimeFrame
- type WorkTimes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteOneEmployee ¶
func FindManyEmployees ¶
func FindManyTimeFrames ¶
Types ¶
type Employee ¶
type Employee struct { ID primitive.ObjectID `bson:"_id,omitempty"` CompanyID primitive.ObjectID `bson:"company_id,omitempty"` Name string `bson:"name,omitempty"` Surname string `bson:"surname,omitempty"` WorkTimes WorkTimes `bson:"work_times,omitempty"` Competence []primitive.ObjectID `bson:"competence,omitempty"` }
Employees not only have personal work times but also competence: set of services which they can perform.
type EmployeeUpdate ¶
type WorkTimes ¶
type WorkTimes struct { Mo []TimeFrame `bson:"mo,omitempty"` Tu []TimeFrame `bson:"tu,omitempty"` We []TimeFrame `bson:"we,omitempty"` Th []TimeFrame `bson:"th,omitempty"` Fr []TimeFrame `bson:"fr,omitempty"` Sa []TimeFrame `bson:"sa,omitempty"` Su []TimeFrame `bson:"su,omitempty"` }
At each day there may be many work time intervals.
Click to show internal directories.
Click to hide internal directories.