Documentation
¶
Index ¶
- Constants
- Variables
- func IsTerminal(status string) bool
- func LocalIntToUnixUTC(date int64, localInt int, tz string) int64
- func NewView(caller router.Caller, tenantId, staffId string) view.Presenter
- func Transition(current, event string) (string, error)
- type AddCalendarExceptionArgs
- func (m *AddCalendarExceptionArgs) DecodeFields(r model.FieldReader)
- func (m *AddCalendarExceptionArgs) EncodeFields(w model.FieldWriter)
- func (m *AddCalendarExceptionArgs) IsNil() bool
- func (m *AddCalendarExceptionArgs) ModelName() string
- func (m *AddCalendarExceptionArgs) Pointers() []any
- func (m *AddCalendarExceptionArgs) Schema() []model.Field
- func (m *AddCalendarExceptionArgs) Validate(action byte) error
- type AddCalendarExceptionArgsList
- func (s *AddCalendarExceptionArgsList) Append() model.Fielder
- func (s *AddCalendarExceptionArgsList) At(i int) model.Fielder
- func (s *AddCalendarExceptionArgsList) DecodeFields(_ model.FieldReader)
- func (s *AddCalendarExceptionArgsList) EncodeFields(_ model.FieldWriter)
- func (s *AddCalendarExceptionArgsList) IsNil() bool
- func (s *AddCalendarExceptionArgsList) Len() int
- func (s *AddCalendarExceptionArgsList) Pointers() []any
- func (s *AddCalendarExceptionArgsList) Schema() []model.Field
- type CatalogReader
- type ChangeReservationStatusArgs
- func (m *ChangeReservationStatusArgs) DecodeFields(r model.FieldReader)
- func (m *ChangeReservationStatusArgs) EncodeFields(w model.FieldWriter)
- func (m *ChangeReservationStatusArgs) IsNil() bool
- func (m *ChangeReservationStatusArgs) ModelName() string
- func (m *ChangeReservationStatusArgs) Pointers() []any
- func (m *ChangeReservationStatusArgs) Schema() []model.Field
- func (m *ChangeReservationStatusArgs) Validate(action byte) error
- type ChangeReservationStatusArgsList
- func (s *ChangeReservationStatusArgsList) Append() model.Fielder
- func (s *ChangeReservationStatusArgsList) At(i int) model.Fielder
- func (s *ChangeReservationStatusArgsList) DecodeFields(_ model.FieldReader)
- func (s *ChangeReservationStatusArgsList) EncodeFields(_ model.FieldWriter)
- func (s *ChangeReservationStatusArgsList) IsNil() bool
- func (s *ChangeReservationStatusArgsList) Len() int
- func (s *ChangeReservationStatusArgsList) Pointers() []any
- func (s *ChangeReservationStatusArgsList) Schema() []model.Field
- type ChangeStatusCmd
- type CreateReservationArgs
- func (m *CreateReservationArgs) DecodeFields(r model.FieldReader)
- func (m *CreateReservationArgs) EncodeFields(w model.FieldWriter)
- func (m *CreateReservationArgs) IsNil() bool
- func (m *CreateReservationArgs) ModelName() string
- func (m *CreateReservationArgs) Pointers() []any
- func (m *CreateReservationArgs) Schema() []model.Field
- func (m *CreateReservationArgs) Validate(action byte) error
- type CreateReservationArgsList
- func (s *CreateReservationArgsList) Append() model.Fielder
- func (s *CreateReservationArgsList) At(i int) model.Fielder
- func (s *CreateReservationArgsList) DecodeFields(_ model.FieldReader)
- func (s *CreateReservationArgsList) EncodeFields(_ model.FieldWriter)
- func (s *CreateReservationArgsList) IsNil() bool
- func (s *CreateReservationArgsList) Len() int
- func (s *CreateReservationArgsList) Pointers() []any
- func (s *CreateReservationArgsList) Schema() []model.Field
- type CreateReservationCmd
- type Deps
- type DirectoryReader
- type EmployeeServiceConfig
- func (m *EmployeeServiceConfig) DecodeFields(r model.FieldReader)
- func (m *EmployeeServiceConfig) EncodeFields(w model.FieldWriter)
- func (m *EmployeeServiceConfig) IsNil() bool
- func (m *EmployeeServiceConfig) ModelName() string
- func (m *EmployeeServiceConfig) Pointers() []any
- func (m *EmployeeServiceConfig) Schema() []model.Field
- func (m *EmployeeServiceConfig) Validate(action byte) error
- type EmployeeServiceConfigList
- func (s *EmployeeServiceConfigList) Append() model.Fielder
- func (s *EmployeeServiceConfigList) At(i int) model.Fielder
- func (s *EmployeeServiceConfigList) DecodeFields(_ model.FieldReader)
- func (s *EmployeeServiceConfigList) EncodeFields(_ model.FieldWriter)
- func (s *EmployeeServiceConfigList) IsNil() bool
- func (s *EmployeeServiceConfigList) Len() int
- func (s *EmployeeServiceConfigList) Pointers() []any
- func (s *EmployeeServiceConfigList) Schema() []model.Field
- type ExpirePendingReservationsArgs
- func (m *ExpirePendingReservationsArgs) DecodeFields(r model.FieldReader)
- func (m *ExpirePendingReservationsArgs) EncodeFields(w model.FieldWriter)
- func (m *ExpirePendingReservationsArgs) IsNil() bool
- func (m *ExpirePendingReservationsArgs) ModelName() string
- func (m *ExpirePendingReservationsArgs) Pointers() []any
- func (m *ExpirePendingReservationsArgs) Schema() []model.Field
- func (m *ExpirePendingReservationsArgs) Validate(action byte) error
- type ExpirePendingReservationsArgsList
- func (s *ExpirePendingReservationsArgsList) Append() model.Fielder
- func (s *ExpirePendingReservationsArgsList) At(i int) model.Fielder
- func (s *ExpirePendingReservationsArgsList) DecodeFields(_ model.FieldReader)
- func (s *ExpirePendingReservationsArgsList) EncodeFields(_ model.FieldWriter)
- func (s *ExpirePendingReservationsArgsList) IsNil() bool
- func (s *ExpirePendingReservationsArgsList) Len() int
- func (s *ExpirePendingReservationsArgsList) Pointers() []any
- func (s *ExpirePendingReservationsArgsList) Schema() []model.Field
- type GetReservationArgs
- func (m *GetReservationArgs) DecodeFields(r model.FieldReader)
- func (m *GetReservationArgs) EncodeFields(w model.FieldWriter)
- func (m *GetReservationArgs) IsNil() bool
- func (m *GetReservationArgs) ModelName() string
- func (m *GetReservationArgs) Pointers() []any
- func (m *GetReservationArgs) Schema() []model.Field
- func (m *GetReservationArgs) Validate(action byte) error
- type GetReservationArgsList
- func (s *GetReservationArgsList) Append() model.Fielder
- func (s *GetReservationArgsList) At(i int) model.Fielder
- func (s *GetReservationArgsList) DecodeFields(_ model.FieldReader)
- func (s *GetReservationArgsList) EncodeFields(_ model.FieldWriter)
- func (s *GetReservationArgsList) IsNil() bool
- func (s *GetReservationArgsList) Len() int
- func (s *GetReservationArgsList) Pointers() []any
- func (s *GetReservationArgsList) Schema() []model.Field
- type ListAvailabilityArgs
- func (m *ListAvailabilityArgs) DecodeFields(r model.FieldReader)
- func (m *ListAvailabilityArgs) EncodeFields(w model.FieldWriter)
- func (m *ListAvailabilityArgs) IsNil() bool
- func (m *ListAvailabilityArgs) ModelName() string
- func (m *ListAvailabilityArgs) Pointers() []any
- func (m *ListAvailabilityArgs) Schema() []model.Field
- func (m *ListAvailabilityArgs) Validate(action byte) error
- type ListAvailabilityArgsList
- func (s *ListAvailabilityArgsList) Append() model.Fielder
- func (s *ListAvailabilityArgsList) At(i int) model.Fielder
- func (s *ListAvailabilityArgsList) DecodeFields(_ model.FieldReader)
- func (s *ListAvailabilityArgsList) EncodeFields(_ model.FieldWriter)
- func (s *ListAvailabilityArgsList) IsNil() bool
- func (s *ListAvailabilityArgsList) Len() int
- func (s *ListAvailabilityArgsList) Pointers() []any
- func (s *ListAvailabilityArgsList) Schema() []model.Field
- type ListReservationsByClientArgs
- func (m *ListReservationsByClientArgs) DecodeFields(r model.FieldReader)
- func (m *ListReservationsByClientArgs) EncodeFields(w model.FieldWriter)
- func (m *ListReservationsByClientArgs) IsNil() bool
- func (m *ListReservationsByClientArgs) ModelName() string
- func (m *ListReservationsByClientArgs) Pointers() []any
- func (m *ListReservationsByClientArgs) Schema() []model.Field
- func (m *ListReservationsByClientArgs) Validate(action byte) error
- type ListReservationsByClientArgsList
- func (s *ListReservationsByClientArgsList) Append() model.Fielder
- func (s *ListReservationsByClientArgsList) At(i int) model.Fielder
- func (s *ListReservationsByClientArgsList) DecodeFields(_ model.FieldReader)
- func (s *ListReservationsByClientArgsList) EncodeFields(_ model.FieldWriter)
- func (s *ListReservationsByClientArgsList) IsNil() bool
- func (s *ListReservationsByClientArgsList) Len() int
- func (s *ListReservationsByClientArgsList) Pointers() []any
- func (s *ListReservationsByClientArgsList) Schema() []model.Field
- type ListReservationsByStaffArgs
- func (m *ListReservationsByStaffArgs) DecodeFields(r model.FieldReader)
- func (m *ListReservationsByStaffArgs) EncodeFields(w model.FieldWriter)
- func (m *ListReservationsByStaffArgs) IsNil() bool
- func (m *ListReservationsByStaffArgs) ModelName() string
- func (m *ListReservationsByStaffArgs) Pointers() []any
- func (m *ListReservationsByStaffArgs) Schema() []model.Field
- func (m *ListReservationsByStaffArgs) Validate(action byte) error
- type ListReservationsByStaffArgsList
- func (s *ListReservationsByStaffArgsList) Append() model.Fielder
- func (s *ListReservationsByStaffArgsList) At(i int) model.Fielder
- func (s *ListReservationsByStaffArgsList) DecodeFields(_ model.FieldReader)
- func (s *ListReservationsByStaffArgsList) EncodeFields(_ model.FieldWriter)
- func (s *ListReservationsByStaffArgsList) IsNil() bool
- func (s *ListReservationsByStaffArgsList) Len() int
- func (s *ListReservationsByStaffArgsList) Pointers() []any
- func (s *ListReservationsByStaffArgsList) Schema() []model.Field
- type Module
- func (m *Module) AddException(exc WorkCalendarException) error
- func (m *Module) ChangeReservationStatus(cmd ChangeStatusCmd) error
- func (m *Module) CreateReservation(cmd CreateReservationCmd) (Reservation, error)
- func (m *Module) ExpirePendingReservations(tenantId string, before int64) (int, error)
- func (m *Module) GetReservation(tenantId, id string) (Reservation, error)
- func (m *Module) IconSvg() map[string]string
- func (m *Module) ListAvailability(tenantId, staffId, configId string, from, to int64) ([]TimeSlot, error)
- func (m *Module) ListReservationsByClient(tenantId, clientId string) ([]Reservation, error)
- func (m *Module) ListReservationsByStaff(tenantId, staffId string, from, to int64) ([]Reservation, error)
- func (m *Module) ModelName() string
- func (m *Module) MountOps(reg router.OpRegistry)
- func (m *Module) RemoveException(tenantId, exceptionId string) error
- func (m *Module) UpsertCalendarConfig(cfg WorkCalendarConfig) error
- func (m *Module) UpsertWeeklyCalendar(cal WorkCalendarWeekly) error
- type RemoveCalendarExceptionArgs
- func (m *RemoveCalendarExceptionArgs) DecodeFields(r model.FieldReader)
- func (m *RemoveCalendarExceptionArgs) EncodeFields(w model.FieldWriter)
- func (m *RemoveCalendarExceptionArgs) IsNil() bool
- func (m *RemoveCalendarExceptionArgs) ModelName() string
- func (m *RemoveCalendarExceptionArgs) Pointers() []any
- func (m *RemoveCalendarExceptionArgs) Schema() []model.Field
- func (m *RemoveCalendarExceptionArgs) Validate(action byte) error
- type RemoveCalendarExceptionArgsList
- func (s *RemoveCalendarExceptionArgsList) Append() model.Fielder
- func (s *RemoveCalendarExceptionArgsList) At(i int) model.Fielder
- func (s *RemoveCalendarExceptionArgsList) DecodeFields(_ model.FieldReader)
- func (s *RemoveCalendarExceptionArgsList) EncodeFields(_ model.FieldWriter)
- func (s *RemoveCalendarExceptionArgsList) IsNil() bool
- func (s *RemoveCalendarExceptionArgsList) Len() int
- func (s *RemoveCalendarExceptionArgsList) Pointers() []any
- func (s *RemoveCalendarExceptionArgsList) Schema() []model.Field
- type Repository
- func (r *Repository) DeleteException(tenantId, id string) error
- func (r *Repository) GetCalendarConfig(tenantId, staffId string) (WorkCalendarConfig, error)
- func (r *Repository) GetEmployeeServiceConfig(id string) (EmployeeServiceConfig, error)
- func (r *Repository) GetReservation(id string) (Reservation, error)
- func (r *Repository) GetReservationTx(tx *orm.DB, tenantId, id string) (Reservation, error)
- func (r *Repository) InsertEmployeeServiceConfig(cfg EmployeeServiceConfig) error
- func (r *Repository) InsertException(exc WorkCalendarException) error
- func (r *Repository) InsertReservation(res *Reservation) error
- func (r *Repository) ListEmployeeServiceConfigByStaff(tenantId, staffId string) ([]EmployeeServiceConfig, error)
- func (r *Repository) ListExceptions(tenantId, staffId string, from, to int64) ([]WorkCalendarException, error)
- func (r *Repository) ListReservationsByClient(tenantId, clientId string) ([]Reservation, error)
- func (r *Repository) ListReservationsByStaff(tenantId, staffId string, from, to int64) ([]Reservation, error)
- func (r *Repository) ListWeeklyCalendar(tenantId, staffId string) ([]WorkCalendarWeekly, error)
- func (r *Repository) UpdateEmployeeServiceConfig(cfg EmployeeServiceConfig) error
- func (r *Repository) UpdateReservationStatus(id, status, updatedBy string, updatedAt int64, expectedRevision int64) error
- func (r *Repository) UpdateReservationStatusTx(tx *orm.DB, id, status, updatedBy string, updatedAt int64, ...) error
- func (r *Repository) UpsertCalendarConfig(cfg WorkCalendarConfig) error
- func (r *Repository) UpsertWeeklyCalendar(cal WorkCalendarWeekly) error
- type Reservation
- func (m *Reservation) DecodeFields(r model.FieldReader)
- func (m *Reservation) EncodeFields(w model.FieldWriter)
- func (m *Reservation) IsNil() bool
- func (m *Reservation) ModelName() string
- func (m *Reservation) Pointers() []any
- func (m *Reservation) Schema() []model.Field
- func (m *Reservation) Validate(action byte) error
- type ReservationList
- func (s *ReservationList) Append() model.Fielder
- func (s *ReservationList) At(i int) model.Fielder
- func (s *ReservationList) DecodeFields(_ model.FieldReader)
- func (s *ReservationList) EncodeFields(_ model.FieldWriter)
- func (s *ReservationList) IsNil() bool
- func (s *ReservationList) Len() int
- func (s *ReservationList) Pointers() []any
- func (s *ReservationList) Schema() []model.Field
- type SchedulingService
- type StaffReader
- type TimeSlot
- func (m *TimeSlot) DecodeFields(r model.FieldReader)
- func (m *TimeSlot) EncodeFields(w model.FieldWriter)
- func (m *TimeSlot) IsNil() bool
- func (m *TimeSlot) ModelName() string
- func (m *TimeSlot) Pointers() []any
- func (m *TimeSlot) Schema() []model.Field
- func (m *TimeSlot) Validate(action byte) error
- type TimeSlotList
- func (s *TimeSlotList) Append() model.Fielder
- func (s *TimeSlotList) At(i int) model.Fielder
- func (s *TimeSlotList) DecodeFields(_ model.FieldReader)
- func (s *TimeSlotList) EncodeFields(_ model.FieldWriter)
- func (s *TimeSlotList) IsNil() bool
- func (s *TimeSlotList) Len() int
- func (s *TimeSlotList) Pointers() []any
- func (s *TimeSlotList) Schema() []model.Field
- type UpsertCalendarConfigArgs
- func (m *UpsertCalendarConfigArgs) DecodeFields(r model.FieldReader)
- func (m *UpsertCalendarConfigArgs) EncodeFields(w model.FieldWriter)
- func (m *UpsertCalendarConfigArgs) IsNil() bool
- func (m *UpsertCalendarConfigArgs) ModelName() string
- func (m *UpsertCalendarConfigArgs) Pointers() []any
- func (m *UpsertCalendarConfigArgs) Schema() []model.Field
- func (m *UpsertCalendarConfigArgs) Validate(action byte) error
- type UpsertCalendarConfigArgsList
- func (s *UpsertCalendarConfigArgsList) Append() model.Fielder
- func (s *UpsertCalendarConfigArgsList) At(i int) model.Fielder
- func (s *UpsertCalendarConfigArgsList) DecodeFields(_ model.FieldReader)
- func (s *UpsertCalendarConfigArgsList) EncodeFields(_ model.FieldWriter)
- func (s *UpsertCalendarConfigArgsList) IsNil() bool
- func (s *UpsertCalendarConfigArgsList) Len() int
- func (s *UpsertCalendarConfigArgsList) Pointers() []any
- func (s *UpsertCalendarConfigArgsList) Schema() []model.Field
- type UpsertWeeklyCalendarArgs
- func (m *UpsertWeeklyCalendarArgs) DecodeFields(r model.FieldReader)
- func (m *UpsertWeeklyCalendarArgs) EncodeFields(w model.FieldWriter)
- func (m *UpsertWeeklyCalendarArgs) IsNil() bool
- func (m *UpsertWeeklyCalendarArgs) ModelName() string
- func (m *UpsertWeeklyCalendarArgs) Pointers() []any
- func (m *UpsertWeeklyCalendarArgs) Schema() []model.Field
- func (m *UpsertWeeklyCalendarArgs) Validate(action byte) error
- type UpsertWeeklyCalendarArgsList
- func (s *UpsertWeeklyCalendarArgsList) Append() model.Fielder
- func (s *UpsertWeeklyCalendarArgsList) At(i int) model.Fielder
- func (s *UpsertWeeklyCalendarArgsList) DecodeFields(_ model.FieldReader)
- func (s *UpsertWeeklyCalendarArgsList) EncodeFields(_ model.FieldWriter)
- func (s *UpsertWeeklyCalendarArgsList) IsNil() bool
- func (s *UpsertWeeklyCalendarArgsList) Len() int
- func (s *UpsertWeeklyCalendarArgsList) Pointers() []any
- func (s *UpsertWeeklyCalendarArgsList) Schema() []model.Field
- type WorkCalendarConfig
- func (m *WorkCalendarConfig) DecodeFields(r model.FieldReader)
- func (m *WorkCalendarConfig) EncodeFields(w model.FieldWriter)
- func (m *WorkCalendarConfig) IsNil() bool
- func (m *WorkCalendarConfig) ModelName() string
- func (m *WorkCalendarConfig) Pointers() []any
- func (m *WorkCalendarConfig) Schema() []model.Field
- func (m *WorkCalendarConfig) Validate(action byte) error
- type WorkCalendarConfigList
- func (s *WorkCalendarConfigList) Append() model.Fielder
- func (s *WorkCalendarConfigList) At(i int) model.Fielder
- func (s *WorkCalendarConfigList) DecodeFields(_ model.FieldReader)
- func (s *WorkCalendarConfigList) EncodeFields(_ model.FieldWriter)
- func (s *WorkCalendarConfigList) IsNil() bool
- func (s *WorkCalendarConfigList) Len() int
- func (s *WorkCalendarConfigList) Pointers() []any
- func (s *WorkCalendarConfigList) Schema() []model.Field
- type WorkCalendarException
- func (m *WorkCalendarException) DecodeFields(r model.FieldReader)
- func (m *WorkCalendarException) EncodeFields(w model.FieldWriter)
- func (m *WorkCalendarException) IsNil() bool
- func (m *WorkCalendarException) ModelName() string
- func (m *WorkCalendarException) Pointers() []any
- func (m *WorkCalendarException) Schema() []model.Field
- func (m *WorkCalendarException) Validate(action byte) error
- type WorkCalendarExceptionList
- func (s *WorkCalendarExceptionList) Append() model.Fielder
- func (s *WorkCalendarExceptionList) At(i int) model.Fielder
- func (s *WorkCalendarExceptionList) DecodeFields(_ model.FieldReader)
- func (s *WorkCalendarExceptionList) EncodeFields(_ model.FieldWriter)
- func (s *WorkCalendarExceptionList) IsNil() bool
- func (s *WorkCalendarExceptionList) Len() int
- func (s *WorkCalendarExceptionList) Pointers() []any
- func (s *WorkCalendarExceptionList) Schema() []model.Field
- type WorkCalendarWeekly
- func (m *WorkCalendarWeekly) DecodeFields(r model.FieldReader)
- func (m *WorkCalendarWeekly) EncodeFields(w model.FieldWriter)
- func (m *WorkCalendarWeekly) IsNil() bool
- func (m *WorkCalendarWeekly) ModelName() string
- func (m *WorkCalendarWeekly) Pointers() []any
- func (m *WorkCalendarWeekly) Schema() []model.Field
- func (m *WorkCalendarWeekly) Validate(action byte) error
- type WorkCalendarWeeklyList
- func (s *WorkCalendarWeeklyList) Append() model.Fielder
- func (s *WorkCalendarWeeklyList) At(i int) model.Fielder
- func (s *WorkCalendarWeeklyList) DecodeFields(_ model.FieldReader)
- func (s *WorkCalendarWeeklyList) EncodeFields(_ model.FieldWriter)
- func (s *WorkCalendarWeeklyList) IsNil() bool
- func (s *WorkCalendarWeeklyList) Len() int
- func (s *WorkCalendarWeeklyList) Pointers() []any
- func (s *WorkCalendarWeeklyList) Schema() []model.Field
Constants ¶
const ( StatusPending = "PENDING" StatusConfirmed = "CONFIRMED" StatusCancelled = "CANCELLED" StatusCompleted = "COMPLETED" StatusNoShow = "NO_SHOW" StatusExpired = "EXPIRED" // Unpaid reservation that timed out (trigger: external scheduler via MCP) StatusRescheduled = "RESCHEDULED" // Original reservation superseded by a new one (audit trail) )
States
const ( EventConfirm = "CONFIRM" EventCancel = "CANCEL" EventComplete = "COMPLETE" EventNoShow = "NO_SHOW_EVENT" EventExpire = "EXPIRE" EventReschedule = "RESCHEDULE" // Marks original as RESCHEDULED; new reservation created atomically )
Events
const ( OpCreateReservation = "create_reservation" OpGetReservation = "get_reservation" OpListReservationsByStaff = "list_reservations_by_staff" OpListReservationsByClient = "list_reservations_by_client" OpChangeReservationStatus = "change_reservation_status" OpExpirePendingReservations = "expire_pending_reservations" OpUpsertCalendarConfig = "upsert_calendar_config" OpUpsertWeeklyCalendar = "upsert_weekly_calendar" OpAddCalendarException = "add_calendar_exception" OpRemoveCalendarException = "remove_calendar_exception" OpListAvailability = "list_availability" )
const ( EventReservationCreated = "appointment.reservation.created" EventReservationConfirmed = "appointment.reservation.confirmed" EventReservationCancelled = "appointment.reservation.cancelled" EventReservationCompleted = "appointment.reservation.completed" EventReservationNoShow = "appointment.reservation.no_show" EventReservationExpired = "appointment.reservation.expired" EventReservationRescheduled = "appointment.reservation.rescheduled" )
Domain events emitted by this module.
Variables ¶
var ( ErrNotFound = fmt.Err("record", "not", "found") ErrConflict = fmt.Err("optimistic", "concurrency", "conflict") )
Package-level sentinel errors
var ( ErrCalendarConfigNotFound = fmt.Err("calendar", "config", "not", "found") ErrSlotTaken = fmt.Err("slot", "taken") )
var AddCalendarExceptionArgsModel = model.Definition{ Name: "add_calendar_exception_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "staff_id", Type: input.Text()}, {Name: "specific_date", Type: input.Number()}, {Name: "exception_type", Type: input.Text()}, {Name: "start_time", Type: input.Number()}, {Name: "end_time", Type: input.Number()}, {Name: "notes", Type: input.Text()}, }, }
var ChangeReservationStatusArgsModel = model.Definition{ Name: "change_reservation_status_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "id", Type: input.Text()}, {Name: "event", Type: input.Text()}, {Name: "actor_id", Type: input.Text()}, {Name: "payment_id", Type: input.Text()}, {Name: "revision", Type: input.Number()}, }, }
var CreateReservationArgsModel = model.Definition{ Name: "create_reservation_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "client_id", Type: input.Text()}, {Name: "creator_user_id", Type: input.Text()}, {Name: "employee_service_config_id", Type: input.Text()}, {Name: "slot_start_utc", Type: input.Number()}, {Name: "notes", Type: input.Text()}, {Name: "rescheduled_from_id", Type: input.Text()}, }, }
var EmployeeServiceConfigModel = model.Definition{ Name: "employee_service_config", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "tenant_id", Type: model.Text(), NotNull: true}, {Name: "staff_id", Type: model.Text(), NotNull: true}, {Name: "service_id", Type: model.Text(), NotNull: true}, {Name: "duration_min", Type: model.Int()}, {Name: "buffer_min", Type: model.Int()}, {Name: "price_override", Type: model.Float()}, {Name: "payment_required", Type: model.Bool()}, {Name: "is_active", Type: model.Bool()}, }, }
var EmployeeServiceConfig_ = struct { Id string TenantId string StaffId string ServiceId string DurationMin string BufferMin string PriceOverride string PaymentRequired string IsActive string }{ Id: "id", TenantId: "tenant_id", StaffId: "staff_id", ServiceId: "service_id", DurationMin: "duration_min", BufferMin: "buffer_min", PriceOverride: "price_override", PaymentRequired: "payment_required", IsActive: "is_active", }
var ErrInvalidTransition = fmt.Err("invalid", "transition")
ErrInvalidTransition is returned when a transition is not allowed.
var ExpirePendingReservationsArgsModel = model.Definition{ Name: "expire_pending_reservations_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "before", Type: input.Number()}, }, }
var GetReservationArgsModel = model.Definition{ Name: "get_reservation_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "id", Type: input.Text()}, }, }
var ListAvailabilityArgsModel = model.Definition{ Name: "list_availability_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "staff_id", Type: input.Text()}, {Name: "config_id", Type: input.Text()}, {Name: "from", Type: input.Number()}, {Name: "to", Type: input.Number()}, }, }
var ListReservationsByClientArgsModel = model.Definition{ Name: "list_reservations_by_client_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "client_id", Type: input.Text()}, }, }
var ListReservationsByStaffArgsModel = model.Definition{ Name: "list_reservations_by_staff_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "staff_id", Type: input.Text()}, {Name: "from", Type: input.Number()}, {Name: "to", Type: input.Number()}, }, }
var RemoveCalendarExceptionArgsModel = model.Definition{ Name: "remove_calendar_exception_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "exception_id", Type: input.Text()}, }, }
var ReservationModel = model.Definition{ Name: "reservation", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "tenant_id", Type: model.Text(), NotNull: true}, {Name: "client_id", Type: model.Text(), NotNull: true}, {Name: "creator_user_id", Type: model.Text()}, {Name: "employee_service_config_id", Type: model.Text(), NotNull: true}, {Name: "staff_idsnapshot", Type: model.Text()}, {Name: "service_idsnapshot", Type: model.Text()}, {Name: "duration_min_snapshot", Type: model.Int()}, {Name: "price_snapshot", Type: model.Float()}, {Name: "currency_snapshot", Type: model.Text()}, {Name: "reservation_date", Type: model.Int()}, {Name: "reservation_time", Type: model.Int()}, {Name: "local_string_date", Type: model.Text()}, {Name: "local_string_time", Type: model.Text()}, {Name: "status", Type: model.Text(), NotNull: true}, {Name: "rescheduled_from_id", Type: model.Text()}, {Name: "payment_id", Type: model.Text()}, {Name: "notes", Type: model.Text()}, {Name: "updated_at", Type: model.Int()}, {Name: "updated_by", Type: model.Text()}, {Name: "revision", Type: model.Int()}, }, }
NOTA: "staff_idsnapshot" / "service_idsnapshot" preservan EXACTAMENTE el nombre de columna actual (irregularidad histórica, sin guión bajo) — NO renombrar la columna. Ver §1.1.
var Reservation_ = struct { Id string TenantId string ClientId string CreatorUserId string EmployeeServiceConfigId string StaffIdsnapshot string ServiceIdsnapshot string DurationMinSnapshot string PriceSnapshot string CurrencySnapshot string ReservationDate string ReservationTime string LocalStringDate string LocalStringTime string Status string RescheduledFromId string PaymentId string Notes string UpdatedAt string UpdatedBy string Revision string }{ Id: "id", TenantId: "tenant_id", ClientId: "client_id", CreatorUserId: "creator_user_id", EmployeeServiceConfigId: "employee_service_config_id", StaffIdsnapshot: "staff_idsnapshot", ServiceIdsnapshot: "service_idsnapshot", DurationMinSnapshot: "duration_min_snapshot", PriceSnapshot: "price_snapshot", CurrencySnapshot: "currency_snapshot", ReservationDate: "reservation_date", ReservationTime: "reservation_time", LocalStringDate: "local_string_date", LocalStringTime: "local_string_time", Status: "status", RescheduledFromId: "rescheduled_from_id", PaymentId: "payment_id", Notes: "notes", UpdatedAt: "updated_at", UpdatedBy: "updated_by", Revision: "revision", }
var TimeSlotModel = model.Definition{ Name: "time_slot", Fields: model.Fields{ {Name: "start_utc", Type: model.Int()}, {Name: "end_utc", Type: model.Int()}, }, }
var UpsertCalendarConfigArgsModel = model.Definition{ Name: "upsert_calendar_config_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "staff_id", Type: input.Text()}, {Name: "timezone", Type: input.Text()}, {Name: "is_active", Type: input.Checkbox()}, }, }
var UpsertWeeklyCalendarArgsModel = model.Definition{ Name: "upsert_weekly_calendar_args", Fields: model.Fields{ {Name: "tenant_id", Type: model.Text()}, {Name: "staff_id", Type: input.Text()}, {Name: "day_of_week", Type: input.Number()}, {Name: "work_start", Type: input.Number()}, {Name: "work_finish", Type: input.Number()}, {Name: "break_start", Type: input.Number()}, {Name: "break_finish", Type: input.Number()}, {Name: "is_active", Type: input.Checkbox()}, }, }
var WorkCalendarConfigModel = model.Definition{ Name: "work_calendar_config", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "tenant_id", Type: model.Text(), NotNull: true}, {Name: "staff_id", Type: model.Text(), NotNull: true}, {Name: "timezone", Type: model.Text(), NotNull: true}, {Name: "is_active", Type: model.Bool()}, }, }
var WorkCalendarConfig_ = struct { Id string TenantId string StaffId string Timezone string IsActive string }{ Id: "id", TenantId: "tenant_id", StaffId: "staff_id", Timezone: "timezone", IsActive: "is_active", }
var WorkCalendarExceptionModel = model.Definition{ Name: "work_calendar_exception", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "tenant_id", Type: model.Text(), NotNull: true}, {Name: "staff_id", Type: model.Text(), NotNull: true}, {Name: "specific_date", Type: model.Int()}, {Name: "exception_type", Type: model.Text()}, {Name: "start_time", Type: model.Int()}, {Name: "end_time", Type: model.Int()}, {Name: "notes", Type: model.Text()}, }, }
var WorkCalendarException_ = struct { Id string TenantId string StaffId string SpecificDate string ExceptionType string StartTime string EndTime string Notes string }{ Id: "id", TenantId: "tenant_id", StaffId: "staff_id", SpecificDate: "specific_date", ExceptionType: "exception_type", StartTime: "start_time", EndTime: "end_time", Notes: "notes", }
var WorkCalendarWeeklyModel = model.Definition{ Name: "work_calendar_weekly", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "tenant_id", Type: model.Text(), NotNull: true}, {Name: "staff_id", Type: model.Text(), NotNull: true}, {Name: "day_of_week", Type: model.Int()}, {Name: "work_start", Type: model.Int()}, {Name: "work_finish", Type: model.Int()}, {Name: "break_start", Type: model.Int()}, {Name: "break_finish", Type: model.Int()}, {Name: "is_active", Type: model.Bool()}, }, }
var WorkCalendarWeekly_ = struct { Id string TenantId string StaffId string DayOfWeek string WorkStart string WorkFinish string BreakStart string BreakFinish string IsActive string }{ Id: "id", TenantId: "tenant_id", StaffId: "staff_id", DayOfWeek: "day_of_week", WorkStart: "work_start", WorkFinish: "work_finish", BreakStart: "break_start", BreakFinish: "break_finish", IsActive: "is_active", }
Functions ¶
func IsTerminal ¶
IsTerminal returns true if the status has no outgoing transitions.
func LocalIntToUnixUTC ¶
LocalIntToUnixUTC interprets localInt as minutes from midnight on the given date (UTC midnight) in the given tz.
func NewView ¶
NewView builds the Reservation Presenter — scoped to one staff member's schedule, since there is no unscoped "list all reservations for a tenant" op (see docs/ARCHITECTURE.md §7). List-only: no Saver/Deleter capability (reservations mutate only via ChangeReservationStatus's FSM-gated transitions, and are never hard-deleted).
func Transition ¶
Transition returns the next state or an error if the transition is invalid.
Types ¶
type AddCalendarExceptionArgs ¶
type AddCalendarExceptionArgs struct {
TenantId string
StaffId string
SpecificDate int64
ExceptionType string
StartTime int64
EndTime int64
Notes string
}
func (*AddCalendarExceptionArgs) DecodeFields ¶
func (m *AddCalendarExceptionArgs) DecodeFields(r model.FieldReader)
func (*AddCalendarExceptionArgs) EncodeFields ¶
func (m *AddCalendarExceptionArgs) EncodeFields(w model.FieldWriter)
func (*AddCalendarExceptionArgs) IsNil ¶
func (m *AddCalendarExceptionArgs) IsNil() bool
func (*AddCalendarExceptionArgs) ModelName ¶
func (m *AddCalendarExceptionArgs) ModelName() string
func (*AddCalendarExceptionArgs) Pointers ¶
func (m *AddCalendarExceptionArgs) Pointers() []any
func (*AddCalendarExceptionArgs) Schema ¶
func (m *AddCalendarExceptionArgs) Schema() []model.Field
func (*AddCalendarExceptionArgs) Validate ¶
func (m *AddCalendarExceptionArgs) Validate(action byte) error
type AddCalendarExceptionArgsList ¶
type AddCalendarExceptionArgsList []*AddCalendarExceptionArgs
func (*AddCalendarExceptionArgsList) Append ¶
func (s *AddCalendarExceptionArgsList) Append() model.Fielder
func (*AddCalendarExceptionArgsList) At ¶
func (s *AddCalendarExceptionArgsList) At(i int) model.Fielder
func (*AddCalendarExceptionArgsList) DecodeFields ¶
func (s *AddCalendarExceptionArgsList) DecodeFields(_ model.FieldReader)
func (*AddCalendarExceptionArgsList) EncodeFields ¶
func (s *AddCalendarExceptionArgsList) EncodeFields(_ model.FieldWriter)
func (*AddCalendarExceptionArgsList) IsNil ¶
func (s *AddCalendarExceptionArgsList) IsNil() bool
func (*AddCalendarExceptionArgsList) Len ¶
func (s *AddCalendarExceptionArgsList) Len() int
func (*AddCalendarExceptionArgsList) Pointers ¶
func (s *AddCalendarExceptionArgsList) Pointers() []any
func (*AddCalendarExceptionArgsList) Schema ¶
func (s *AddCalendarExceptionArgsList) Schema() []model.Field
type CatalogReader ¶
CatalogReader verifies a service exists and belongs to the tenant.
type ChangeReservationStatusArgs ¶
type ChangeReservationStatusArgs struct {
TenantId string
Id string
Event string
ActorId string
PaymentId string
Revision int64
}
func (*ChangeReservationStatusArgs) DecodeFields ¶
func (m *ChangeReservationStatusArgs) DecodeFields(r model.FieldReader)
func (*ChangeReservationStatusArgs) EncodeFields ¶
func (m *ChangeReservationStatusArgs) EncodeFields(w model.FieldWriter)
func (*ChangeReservationStatusArgs) IsNil ¶
func (m *ChangeReservationStatusArgs) IsNil() bool
func (*ChangeReservationStatusArgs) ModelName ¶
func (m *ChangeReservationStatusArgs) ModelName() string
func (*ChangeReservationStatusArgs) Pointers ¶
func (m *ChangeReservationStatusArgs) Pointers() []any
func (*ChangeReservationStatusArgs) Schema ¶
func (m *ChangeReservationStatusArgs) Schema() []model.Field
func (*ChangeReservationStatusArgs) Validate ¶
func (m *ChangeReservationStatusArgs) Validate(action byte) error
type ChangeReservationStatusArgsList ¶
type ChangeReservationStatusArgsList []*ChangeReservationStatusArgs
func (*ChangeReservationStatusArgsList) Append ¶
func (s *ChangeReservationStatusArgsList) Append() model.Fielder
func (*ChangeReservationStatusArgsList) At ¶
func (s *ChangeReservationStatusArgsList) At(i int) model.Fielder
func (*ChangeReservationStatusArgsList) DecodeFields ¶
func (s *ChangeReservationStatusArgsList) DecodeFields(_ model.FieldReader)
func (*ChangeReservationStatusArgsList) EncodeFields ¶
func (s *ChangeReservationStatusArgsList) EncodeFields(_ model.FieldWriter)
func (*ChangeReservationStatusArgsList) IsNil ¶
func (s *ChangeReservationStatusArgsList) IsNil() bool
func (*ChangeReservationStatusArgsList) Len ¶
func (s *ChangeReservationStatusArgsList) Len() int
func (*ChangeReservationStatusArgsList) Pointers ¶
func (s *ChangeReservationStatusArgsList) Pointers() []any
func (*ChangeReservationStatusArgsList) Schema ¶
func (s *ChangeReservationStatusArgsList) Schema() []model.Field
type ChangeStatusCmd ¶
type CreateReservationArgs ¶
type CreateReservationArgs struct {
TenantId string
ClientId string
CreatorUserId string
EmployeeServiceConfigId string
SlotStartUtc int64
Notes string
RescheduledFromId string
}
func (*CreateReservationArgs) DecodeFields ¶
func (m *CreateReservationArgs) DecodeFields(r model.FieldReader)
func (*CreateReservationArgs) EncodeFields ¶
func (m *CreateReservationArgs) EncodeFields(w model.FieldWriter)
func (*CreateReservationArgs) IsNil ¶
func (m *CreateReservationArgs) IsNil() bool
func (*CreateReservationArgs) ModelName ¶
func (m *CreateReservationArgs) ModelName() string
func (*CreateReservationArgs) Pointers ¶
func (m *CreateReservationArgs) Pointers() []any
func (*CreateReservationArgs) Schema ¶
func (m *CreateReservationArgs) Schema() []model.Field
func (*CreateReservationArgs) Validate ¶
func (m *CreateReservationArgs) Validate(action byte) error
type CreateReservationArgsList ¶
type CreateReservationArgsList []*CreateReservationArgs
func (*CreateReservationArgsList) Append ¶
func (s *CreateReservationArgsList) Append() model.Fielder
func (*CreateReservationArgsList) DecodeFields ¶
func (s *CreateReservationArgsList) DecodeFields(_ model.FieldReader)
func (*CreateReservationArgsList) EncodeFields ¶
func (s *CreateReservationArgsList) EncodeFields(_ model.FieldWriter)
func (*CreateReservationArgsList) IsNil ¶
func (s *CreateReservationArgsList) IsNil() bool
func (*CreateReservationArgsList) Len ¶
func (s *CreateReservationArgsList) Len() int
func (*CreateReservationArgsList) Pointers ¶
func (s *CreateReservationArgsList) Pointers() []any
func (*CreateReservationArgsList) Schema ¶
func (s *CreateReservationArgsList) Schema() []model.Field
type CreateReservationCmd ¶
type Deps ¶
type Deps struct {
Staff StaffReader
Catalog CatalogReader
Directory DirectoryReader
IDs model.IDGenerator // requerido
Publisher events.Publisher // opcional — nil desactiva
}
type DirectoryReader ¶
DirectoryReader verifies a client exists and belongs to the tenant.
type EmployeeServiceConfig ¶
type EmployeeServiceConfig struct {
Id string
TenantId string
StaffId string
ServiceId string
DurationMin int64
BufferMin int64
PriceOverride float64
PaymentRequired bool
IsActive bool
}
func ReadOneEmployeeServiceConfig ¶
func ReadOneEmployeeServiceConfig(qb *orm.QB, model *EmployeeServiceConfig) (*EmployeeServiceConfig, error)
func (*EmployeeServiceConfig) DecodeFields ¶
func (m *EmployeeServiceConfig) DecodeFields(r model.FieldReader)
func (*EmployeeServiceConfig) EncodeFields ¶
func (m *EmployeeServiceConfig) EncodeFields(w model.FieldWriter)
func (*EmployeeServiceConfig) IsNil ¶
func (m *EmployeeServiceConfig) IsNil() bool
func (*EmployeeServiceConfig) ModelName ¶
func (m *EmployeeServiceConfig) ModelName() string
func (*EmployeeServiceConfig) Pointers ¶
func (m *EmployeeServiceConfig) Pointers() []any
func (*EmployeeServiceConfig) Schema ¶
func (m *EmployeeServiceConfig) Schema() []model.Field
func (*EmployeeServiceConfig) Validate ¶
func (m *EmployeeServiceConfig) Validate(action byte) error
type EmployeeServiceConfigList ¶
type EmployeeServiceConfigList []*EmployeeServiceConfig
func ReadAllEmployeeServiceConfig ¶
func ReadAllEmployeeServiceConfig(qb *orm.QB) (EmployeeServiceConfigList, error)
func (*EmployeeServiceConfigList) Append ¶
func (s *EmployeeServiceConfigList) Append() model.Fielder
func (*EmployeeServiceConfigList) DecodeFields ¶
func (s *EmployeeServiceConfigList) DecodeFields(_ model.FieldReader)
func (*EmployeeServiceConfigList) EncodeFields ¶
func (s *EmployeeServiceConfigList) EncodeFields(_ model.FieldWriter)
func (*EmployeeServiceConfigList) IsNil ¶
func (s *EmployeeServiceConfigList) IsNil() bool
func (*EmployeeServiceConfigList) Len ¶
func (s *EmployeeServiceConfigList) Len() int
func (*EmployeeServiceConfigList) Pointers ¶
func (s *EmployeeServiceConfigList) Pointers() []any
func (*EmployeeServiceConfigList) Schema ¶
func (s *EmployeeServiceConfigList) Schema() []model.Field
type ExpirePendingReservationsArgs ¶
func (*ExpirePendingReservationsArgs) DecodeFields ¶
func (m *ExpirePendingReservationsArgs) DecodeFields(r model.FieldReader)
func (*ExpirePendingReservationsArgs) EncodeFields ¶
func (m *ExpirePendingReservationsArgs) EncodeFields(w model.FieldWriter)
func (*ExpirePendingReservationsArgs) IsNil ¶
func (m *ExpirePendingReservationsArgs) IsNil() bool
func (*ExpirePendingReservationsArgs) ModelName ¶
func (m *ExpirePendingReservationsArgs) ModelName() string
func (*ExpirePendingReservationsArgs) Pointers ¶
func (m *ExpirePendingReservationsArgs) Pointers() []any
func (*ExpirePendingReservationsArgs) Schema ¶
func (m *ExpirePendingReservationsArgs) Schema() []model.Field
func (*ExpirePendingReservationsArgs) Validate ¶
func (m *ExpirePendingReservationsArgs) Validate(action byte) error
type ExpirePendingReservationsArgsList ¶
type ExpirePendingReservationsArgsList []*ExpirePendingReservationsArgs
func (*ExpirePendingReservationsArgsList) Append ¶
func (s *ExpirePendingReservationsArgsList) Append() model.Fielder
func (*ExpirePendingReservationsArgsList) At ¶
func (s *ExpirePendingReservationsArgsList) At(i int) model.Fielder
func (*ExpirePendingReservationsArgsList) DecodeFields ¶
func (s *ExpirePendingReservationsArgsList) DecodeFields(_ model.FieldReader)
func (*ExpirePendingReservationsArgsList) EncodeFields ¶
func (s *ExpirePendingReservationsArgsList) EncodeFields(_ model.FieldWriter)
func (*ExpirePendingReservationsArgsList) IsNil ¶
func (s *ExpirePendingReservationsArgsList) IsNil() bool
func (*ExpirePendingReservationsArgsList) Len ¶
func (s *ExpirePendingReservationsArgsList) Len() int
func (*ExpirePendingReservationsArgsList) Pointers ¶
func (s *ExpirePendingReservationsArgsList) Pointers() []any
func (*ExpirePendingReservationsArgsList) Schema ¶
func (s *ExpirePendingReservationsArgsList) Schema() []model.Field
type GetReservationArgs ¶
func (*GetReservationArgs) DecodeFields ¶
func (m *GetReservationArgs) DecodeFields(r model.FieldReader)
func (*GetReservationArgs) EncodeFields ¶
func (m *GetReservationArgs) EncodeFields(w model.FieldWriter)
func (*GetReservationArgs) IsNil ¶
func (m *GetReservationArgs) IsNil() bool
func (*GetReservationArgs) ModelName ¶
func (m *GetReservationArgs) ModelName() string
func (*GetReservationArgs) Pointers ¶
func (m *GetReservationArgs) Pointers() []any
func (*GetReservationArgs) Schema ¶
func (m *GetReservationArgs) Schema() []model.Field
func (*GetReservationArgs) Validate ¶
func (m *GetReservationArgs) Validate(action byte) error
type GetReservationArgsList ¶
type GetReservationArgsList []*GetReservationArgs
func (*GetReservationArgsList) Append ¶
func (s *GetReservationArgsList) Append() model.Fielder
func (*GetReservationArgsList) DecodeFields ¶
func (s *GetReservationArgsList) DecodeFields(_ model.FieldReader)
func (*GetReservationArgsList) EncodeFields ¶
func (s *GetReservationArgsList) EncodeFields(_ model.FieldWriter)
func (*GetReservationArgsList) IsNil ¶
func (s *GetReservationArgsList) IsNil() bool
func (*GetReservationArgsList) Len ¶
func (s *GetReservationArgsList) Len() int
func (*GetReservationArgsList) Pointers ¶
func (s *GetReservationArgsList) Pointers() []any
func (*GetReservationArgsList) Schema ¶
func (s *GetReservationArgsList) Schema() []model.Field
type ListAvailabilityArgs ¶
type ListAvailabilityArgs struct {
TenantId string
StaffId string
ConfigId string
From int64
To int64
}
func (*ListAvailabilityArgs) DecodeFields ¶
func (m *ListAvailabilityArgs) DecodeFields(r model.FieldReader)
func (*ListAvailabilityArgs) EncodeFields ¶
func (m *ListAvailabilityArgs) EncodeFields(w model.FieldWriter)
func (*ListAvailabilityArgs) IsNil ¶
func (m *ListAvailabilityArgs) IsNil() bool
func (*ListAvailabilityArgs) ModelName ¶
func (m *ListAvailabilityArgs) ModelName() string
func (*ListAvailabilityArgs) Pointers ¶
func (m *ListAvailabilityArgs) Pointers() []any
func (*ListAvailabilityArgs) Schema ¶
func (m *ListAvailabilityArgs) Schema() []model.Field
func (*ListAvailabilityArgs) Validate ¶
func (m *ListAvailabilityArgs) Validate(action byte) error
type ListAvailabilityArgsList ¶
type ListAvailabilityArgsList []*ListAvailabilityArgs
func (*ListAvailabilityArgsList) Append ¶
func (s *ListAvailabilityArgsList) Append() model.Fielder
func (*ListAvailabilityArgsList) DecodeFields ¶
func (s *ListAvailabilityArgsList) DecodeFields(_ model.FieldReader)
func (*ListAvailabilityArgsList) EncodeFields ¶
func (s *ListAvailabilityArgsList) EncodeFields(_ model.FieldWriter)
func (*ListAvailabilityArgsList) IsNil ¶
func (s *ListAvailabilityArgsList) IsNil() bool
func (*ListAvailabilityArgsList) Len ¶
func (s *ListAvailabilityArgsList) Len() int
func (*ListAvailabilityArgsList) Pointers ¶
func (s *ListAvailabilityArgsList) Pointers() []any
func (*ListAvailabilityArgsList) Schema ¶
func (s *ListAvailabilityArgsList) Schema() []model.Field
type ListReservationsByClientArgs ¶
func (*ListReservationsByClientArgs) DecodeFields ¶
func (m *ListReservationsByClientArgs) DecodeFields(r model.FieldReader)
func (*ListReservationsByClientArgs) EncodeFields ¶
func (m *ListReservationsByClientArgs) EncodeFields(w model.FieldWriter)
func (*ListReservationsByClientArgs) IsNil ¶
func (m *ListReservationsByClientArgs) IsNil() bool
func (*ListReservationsByClientArgs) ModelName ¶
func (m *ListReservationsByClientArgs) ModelName() string
func (*ListReservationsByClientArgs) Pointers ¶
func (m *ListReservationsByClientArgs) Pointers() []any
func (*ListReservationsByClientArgs) Schema ¶
func (m *ListReservationsByClientArgs) Schema() []model.Field
func (*ListReservationsByClientArgs) Validate ¶
func (m *ListReservationsByClientArgs) Validate(action byte) error
type ListReservationsByClientArgsList ¶
type ListReservationsByClientArgsList []*ListReservationsByClientArgs
func (*ListReservationsByClientArgsList) Append ¶
func (s *ListReservationsByClientArgsList) Append() model.Fielder
func (*ListReservationsByClientArgsList) At ¶
func (s *ListReservationsByClientArgsList) At(i int) model.Fielder
func (*ListReservationsByClientArgsList) DecodeFields ¶
func (s *ListReservationsByClientArgsList) DecodeFields(_ model.FieldReader)
func (*ListReservationsByClientArgsList) EncodeFields ¶
func (s *ListReservationsByClientArgsList) EncodeFields(_ model.FieldWriter)
func (*ListReservationsByClientArgsList) IsNil ¶
func (s *ListReservationsByClientArgsList) IsNil() bool
func (*ListReservationsByClientArgsList) Len ¶
func (s *ListReservationsByClientArgsList) Len() int
func (*ListReservationsByClientArgsList) Pointers ¶
func (s *ListReservationsByClientArgsList) Pointers() []any
func (*ListReservationsByClientArgsList) Schema ¶
func (s *ListReservationsByClientArgsList) Schema() []model.Field
type ListReservationsByStaffArgs ¶
func (*ListReservationsByStaffArgs) DecodeFields ¶
func (m *ListReservationsByStaffArgs) DecodeFields(r model.FieldReader)
func (*ListReservationsByStaffArgs) EncodeFields ¶
func (m *ListReservationsByStaffArgs) EncodeFields(w model.FieldWriter)
func (*ListReservationsByStaffArgs) IsNil ¶
func (m *ListReservationsByStaffArgs) IsNil() bool
func (*ListReservationsByStaffArgs) ModelName ¶
func (m *ListReservationsByStaffArgs) ModelName() string
func (*ListReservationsByStaffArgs) Pointers ¶
func (m *ListReservationsByStaffArgs) Pointers() []any
func (*ListReservationsByStaffArgs) Schema ¶
func (m *ListReservationsByStaffArgs) Schema() []model.Field
func (*ListReservationsByStaffArgs) Validate ¶
func (m *ListReservationsByStaffArgs) Validate(action byte) error
type ListReservationsByStaffArgsList ¶
type ListReservationsByStaffArgsList []*ListReservationsByStaffArgs
func (*ListReservationsByStaffArgsList) Append ¶
func (s *ListReservationsByStaffArgsList) Append() model.Fielder
func (*ListReservationsByStaffArgsList) At ¶
func (s *ListReservationsByStaffArgsList) At(i int) model.Fielder
func (*ListReservationsByStaffArgsList) DecodeFields ¶
func (s *ListReservationsByStaffArgsList) DecodeFields(_ model.FieldReader)
func (*ListReservationsByStaffArgsList) EncodeFields ¶
func (s *ListReservationsByStaffArgsList) EncodeFields(_ model.FieldWriter)
func (*ListReservationsByStaffArgsList) IsNil ¶
func (s *ListReservationsByStaffArgsList) IsNil() bool
func (*ListReservationsByStaffArgsList) Len ¶
func (s *ListReservationsByStaffArgsList) Len() int
func (*ListReservationsByStaffArgsList) Pointers ¶
func (s *ListReservationsByStaffArgsList) Pointers() []any
func (*ListReservationsByStaffArgsList) Schema ¶
func (s *ListReservationsByStaffArgsList) Schema() []model.Field
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) AddException ¶
func (m *Module) AddException(exc WorkCalendarException) error
func (*Module) ChangeReservationStatus ¶
func (m *Module) ChangeReservationStatus(cmd ChangeStatusCmd) error
func (*Module) CreateReservation ¶
func (m *Module) CreateReservation(cmd CreateReservationCmd) (Reservation, error)
func (*Module) ExpirePendingReservations ¶
func (*Module) GetReservation ¶
func (m *Module) GetReservation(tenantId, id string) (Reservation, error)
func (*Module) ListAvailability ¶
func (*Module) ListReservationsByClient ¶
func (m *Module) ListReservationsByClient(tenantId, clientId string) ([]Reservation, error)
func (*Module) ListReservationsByStaff ¶
func (m *Module) ListReservationsByStaff(tenantId, staffId string, from, to int64) ([]Reservation, error)
func (*Module) MountOps ¶
func (m *Module) MountOps(reg router.OpRegistry)
func (*Module) RemoveException ¶
func (*Module) UpsertCalendarConfig ¶
func (m *Module) UpsertCalendarConfig(cfg WorkCalendarConfig) error
func (*Module) UpsertWeeklyCalendar ¶
func (m *Module) UpsertWeeklyCalendar(cal WorkCalendarWeekly) error
type RemoveCalendarExceptionArgs ¶
func (*RemoveCalendarExceptionArgs) DecodeFields ¶
func (m *RemoveCalendarExceptionArgs) DecodeFields(r model.FieldReader)
func (*RemoveCalendarExceptionArgs) EncodeFields ¶
func (m *RemoveCalendarExceptionArgs) EncodeFields(w model.FieldWriter)
func (*RemoveCalendarExceptionArgs) IsNil ¶
func (m *RemoveCalendarExceptionArgs) IsNil() bool
func (*RemoveCalendarExceptionArgs) ModelName ¶
func (m *RemoveCalendarExceptionArgs) ModelName() string
func (*RemoveCalendarExceptionArgs) Pointers ¶
func (m *RemoveCalendarExceptionArgs) Pointers() []any
func (*RemoveCalendarExceptionArgs) Schema ¶
func (m *RemoveCalendarExceptionArgs) Schema() []model.Field
func (*RemoveCalendarExceptionArgs) Validate ¶
func (m *RemoveCalendarExceptionArgs) Validate(action byte) error
type RemoveCalendarExceptionArgsList ¶
type RemoveCalendarExceptionArgsList []*RemoveCalendarExceptionArgs
func (*RemoveCalendarExceptionArgsList) Append ¶
func (s *RemoveCalendarExceptionArgsList) Append() model.Fielder
func (*RemoveCalendarExceptionArgsList) At ¶
func (s *RemoveCalendarExceptionArgsList) At(i int) model.Fielder
func (*RemoveCalendarExceptionArgsList) DecodeFields ¶
func (s *RemoveCalendarExceptionArgsList) DecodeFields(_ model.FieldReader)
func (*RemoveCalendarExceptionArgsList) EncodeFields ¶
func (s *RemoveCalendarExceptionArgsList) EncodeFields(_ model.FieldWriter)
func (*RemoveCalendarExceptionArgsList) IsNil ¶
func (s *RemoveCalendarExceptionArgsList) IsNil() bool
func (*RemoveCalendarExceptionArgsList) Len ¶
func (s *RemoveCalendarExceptionArgsList) Len() int
func (*RemoveCalendarExceptionArgsList) Pointers ¶
func (s *RemoveCalendarExceptionArgsList) Pointers() []any
func (*RemoveCalendarExceptionArgsList) Schema ¶
func (s *RemoveCalendarExceptionArgsList) Schema() []model.Field
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository provides CRUD operations for all appointment-booking tables.
func NewRepository ¶
func NewRepository(db *orm.DB, ids model.IDGenerator) (*Repository, error)
NewRepository creates a new Repository and migrates its 5 owned tables when the backend supports DDL (a no-op against storage/mem, used by this module's own tests).
func (*Repository) DeleteException ¶
func (r *Repository) DeleteException(tenantId, id string) error
func (*Repository) GetCalendarConfig ¶
func (r *Repository) GetCalendarConfig(tenantId, staffId string) (WorkCalendarConfig, error)
func (*Repository) GetEmployeeServiceConfig ¶
func (r *Repository) GetEmployeeServiceConfig(id string) (EmployeeServiceConfig, error)
func (*Repository) GetReservation ¶
func (r *Repository) GetReservation(id string) (Reservation, error)
func (*Repository) GetReservationTx ¶
func (r *Repository) GetReservationTx(tx *orm.DB, tenantId, id string) (Reservation, error)
func (*Repository) InsertEmployeeServiceConfig ¶
func (r *Repository) InsertEmployeeServiceConfig(cfg EmployeeServiceConfig) error
func (*Repository) InsertException ¶
func (r *Repository) InsertException(exc WorkCalendarException) error
func (*Repository) InsertReservation ¶
func (r *Repository) InsertReservation(res *Reservation) error
func (*Repository) ListEmployeeServiceConfigByStaff ¶
func (r *Repository) ListEmployeeServiceConfigByStaff(tenantId, staffId string) ([]EmployeeServiceConfig, error)
func (*Repository) ListExceptions ¶
func (r *Repository) ListExceptions(tenantId, staffId string, from, to int64) ([]WorkCalendarException, error)
func (*Repository) ListReservationsByClient ¶
func (r *Repository) ListReservationsByClient(tenantId, clientId string) ([]Reservation, error)
func (*Repository) ListReservationsByStaff ¶
func (r *Repository) ListReservationsByStaff(tenantId, staffId string, from, to int64) ([]Reservation, error)
func (*Repository) ListWeeklyCalendar ¶
func (r *Repository) ListWeeklyCalendar(tenantId, staffId string) ([]WorkCalendarWeekly, error)
func (*Repository) UpdateEmployeeServiceConfig ¶
func (r *Repository) UpdateEmployeeServiceConfig(cfg EmployeeServiceConfig) error
func (*Repository) UpdateReservationStatus ¶
func (r *Repository) UpdateReservationStatus(id, status, updatedBy string, updatedAt int64, expectedRevision int64) error
func (*Repository) UpdateReservationStatusTx ¶
func (*Repository) UpsertCalendarConfig ¶
func (r *Repository) UpsertCalendarConfig(cfg WorkCalendarConfig) error
func (*Repository) UpsertWeeklyCalendar ¶
func (r *Repository) UpsertWeeklyCalendar(cal WorkCalendarWeekly) error
type Reservation ¶
type Reservation struct {
Id string
TenantId string
ClientId string
CreatorUserId string
EmployeeServiceConfigId string
StaffIdsnapshot string
ServiceIdsnapshot string
DurationMinSnapshot int64
PriceSnapshot float64
CurrencySnapshot string
ReservationDate int64
ReservationTime int64
LocalStringDate string
LocalStringTime string
Status string
RescheduledFromId string
PaymentId string
Notes string
UpdatedAt int64
UpdatedBy string
Revision int64
}
func ReadOneReservation ¶
func ReadOneReservation(qb *orm.QB, model *Reservation) (*Reservation, error)
func (*Reservation) DecodeFields ¶
func (m *Reservation) DecodeFields(r model.FieldReader)
func (*Reservation) EncodeFields ¶
func (m *Reservation) EncodeFields(w model.FieldWriter)
func (*Reservation) IsNil ¶
func (m *Reservation) IsNil() bool
func (*Reservation) ModelName ¶
func (m *Reservation) ModelName() string
func (*Reservation) Pointers ¶
func (m *Reservation) Pointers() []any
func (*Reservation) Schema ¶
func (m *Reservation) Schema() []model.Field
func (*Reservation) Validate ¶
func (m *Reservation) Validate(action byte) error
type ReservationList ¶
type ReservationList []*Reservation
func ReadAllReservation ¶
func ReadAllReservation(qb *orm.QB) (ReservationList, error)
func (*ReservationList) Append ¶
func (s *ReservationList) Append() model.Fielder
func (*ReservationList) DecodeFields ¶
func (s *ReservationList) DecodeFields(_ model.FieldReader)
func (*ReservationList) EncodeFields ¶
func (s *ReservationList) EncodeFields(_ model.FieldWriter)
func (*ReservationList) IsNil ¶
func (s *ReservationList) IsNil() bool
func (*ReservationList) Len ¶
func (s *ReservationList) Len() int
func (*ReservationList) Pointers ¶
func (s *ReservationList) Pointers() []any
func (*ReservationList) Schema ¶
func (s *ReservationList) Schema() []model.Field
type SchedulingService ¶
type SchedulingService interface {
// Calendar management
UpsertCalendarConfig(cfg WorkCalendarConfig) error
UpsertWeeklyCalendar(cal WorkCalendarWeekly) error
AddException(exc WorkCalendarException) error
RemoveException(tenantId, exceptionId string) error
// Availability
ListAvailability(tenantId, staffId, configId string, from, to int64) ([]TimeSlot, error)
// Reservations
CreateReservation(cmd CreateReservationCmd) (Reservation, error)
GetReservation(tenantId, id string) (Reservation, error)
ListReservationsByStaff(tenantId, staffId string, from, to int64) ([]Reservation, error)
ListReservationsByClient(tenantId, clientId string) ([]Reservation, error)
ChangeReservationStatus(cmd ChangeStatusCmd) error
ExpirePendingReservations(tenantId string, before int64) (int, error)
}
type StaffReader ¶
StaffReader verifies a staff member exists and belongs to the tenant.
type TimeSlot ¶
func (*TimeSlot) DecodeFields ¶
func (m *TimeSlot) DecodeFields(r model.FieldReader)
func (*TimeSlot) EncodeFields ¶
func (m *TimeSlot) EncodeFields(w model.FieldWriter)
type TimeSlotList ¶
type TimeSlotList []*TimeSlot
func (*TimeSlotList) Append ¶
func (s *TimeSlotList) Append() model.Fielder
func (*TimeSlotList) DecodeFields ¶
func (s *TimeSlotList) DecodeFields(_ model.FieldReader)
func (*TimeSlotList) EncodeFields ¶
func (s *TimeSlotList) EncodeFields(_ model.FieldWriter)
func (*TimeSlotList) IsNil ¶
func (s *TimeSlotList) IsNil() bool
func (*TimeSlotList) Len ¶
func (s *TimeSlotList) Len() int
func (*TimeSlotList) Pointers ¶
func (s *TimeSlotList) Pointers() []any
func (*TimeSlotList) Schema ¶
func (s *TimeSlotList) Schema() []model.Field
type UpsertCalendarConfigArgs ¶
type UpsertCalendarConfigArgs struct {
TenantId string
StaffId string
Timezone string
IsActive bool
}
func (*UpsertCalendarConfigArgs) DecodeFields ¶
func (m *UpsertCalendarConfigArgs) DecodeFields(r model.FieldReader)
func (*UpsertCalendarConfigArgs) EncodeFields ¶
func (m *UpsertCalendarConfigArgs) EncodeFields(w model.FieldWriter)
func (*UpsertCalendarConfigArgs) IsNil ¶
func (m *UpsertCalendarConfigArgs) IsNil() bool
func (*UpsertCalendarConfigArgs) ModelName ¶
func (m *UpsertCalendarConfigArgs) ModelName() string
func (*UpsertCalendarConfigArgs) Pointers ¶
func (m *UpsertCalendarConfigArgs) Pointers() []any
func (*UpsertCalendarConfigArgs) Schema ¶
func (m *UpsertCalendarConfigArgs) Schema() []model.Field
func (*UpsertCalendarConfigArgs) Validate ¶
func (m *UpsertCalendarConfigArgs) Validate(action byte) error
type UpsertCalendarConfigArgsList ¶
type UpsertCalendarConfigArgsList []*UpsertCalendarConfigArgs
func (*UpsertCalendarConfigArgsList) Append ¶
func (s *UpsertCalendarConfigArgsList) Append() model.Fielder
func (*UpsertCalendarConfigArgsList) At ¶
func (s *UpsertCalendarConfigArgsList) At(i int) model.Fielder
func (*UpsertCalendarConfigArgsList) DecodeFields ¶
func (s *UpsertCalendarConfigArgsList) DecodeFields(_ model.FieldReader)
func (*UpsertCalendarConfigArgsList) EncodeFields ¶
func (s *UpsertCalendarConfigArgsList) EncodeFields(_ model.FieldWriter)
func (*UpsertCalendarConfigArgsList) IsNil ¶
func (s *UpsertCalendarConfigArgsList) IsNil() bool
func (*UpsertCalendarConfigArgsList) Len ¶
func (s *UpsertCalendarConfigArgsList) Len() int
func (*UpsertCalendarConfigArgsList) Pointers ¶
func (s *UpsertCalendarConfigArgsList) Pointers() []any
func (*UpsertCalendarConfigArgsList) Schema ¶
func (s *UpsertCalendarConfigArgsList) Schema() []model.Field
type UpsertWeeklyCalendarArgs ¶
type UpsertWeeklyCalendarArgs struct {
TenantId string
StaffId string
DayOfWeek int64
WorkStart int64
WorkFinish int64
BreakStart int64
BreakFinish int64
IsActive bool
}
func (*UpsertWeeklyCalendarArgs) DecodeFields ¶
func (m *UpsertWeeklyCalendarArgs) DecodeFields(r model.FieldReader)
func (*UpsertWeeklyCalendarArgs) EncodeFields ¶
func (m *UpsertWeeklyCalendarArgs) EncodeFields(w model.FieldWriter)
func (*UpsertWeeklyCalendarArgs) IsNil ¶
func (m *UpsertWeeklyCalendarArgs) IsNil() bool
func (*UpsertWeeklyCalendarArgs) ModelName ¶
func (m *UpsertWeeklyCalendarArgs) ModelName() string
func (*UpsertWeeklyCalendarArgs) Pointers ¶
func (m *UpsertWeeklyCalendarArgs) Pointers() []any
func (*UpsertWeeklyCalendarArgs) Schema ¶
func (m *UpsertWeeklyCalendarArgs) Schema() []model.Field
func (*UpsertWeeklyCalendarArgs) Validate ¶
func (m *UpsertWeeklyCalendarArgs) Validate(action byte) error
type UpsertWeeklyCalendarArgsList ¶
type UpsertWeeklyCalendarArgsList []*UpsertWeeklyCalendarArgs
func (*UpsertWeeklyCalendarArgsList) Append ¶
func (s *UpsertWeeklyCalendarArgsList) Append() model.Fielder
func (*UpsertWeeklyCalendarArgsList) At ¶
func (s *UpsertWeeklyCalendarArgsList) At(i int) model.Fielder
func (*UpsertWeeklyCalendarArgsList) DecodeFields ¶
func (s *UpsertWeeklyCalendarArgsList) DecodeFields(_ model.FieldReader)
func (*UpsertWeeklyCalendarArgsList) EncodeFields ¶
func (s *UpsertWeeklyCalendarArgsList) EncodeFields(_ model.FieldWriter)
func (*UpsertWeeklyCalendarArgsList) IsNil ¶
func (s *UpsertWeeklyCalendarArgsList) IsNil() bool
func (*UpsertWeeklyCalendarArgsList) Len ¶
func (s *UpsertWeeklyCalendarArgsList) Len() int
func (*UpsertWeeklyCalendarArgsList) Pointers ¶
func (s *UpsertWeeklyCalendarArgsList) Pointers() []any
func (*UpsertWeeklyCalendarArgsList) Schema ¶
func (s *UpsertWeeklyCalendarArgsList) Schema() []model.Field
type WorkCalendarConfig ¶
type WorkCalendarConfig struct {
Id string
TenantId string
StaffId string
Timezone string
IsActive bool
}
func ReadOneWorkCalendarConfig ¶
func ReadOneWorkCalendarConfig(qb *orm.QB, model *WorkCalendarConfig) (*WorkCalendarConfig, error)
func (*WorkCalendarConfig) DecodeFields ¶
func (m *WorkCalendarConfig) DecodeFields(r model.FieldReader)
func (*WorkCalendarConfig) EncodeFields ¶
func (m *WorkCalendarConfig) EncodeFields(w model.FieldWriter)
func (*WorkCalendarConfig) IsNil ¶
func (m *WorkCalendarConfig) IsNil() bool
func (*WorkCalendarConfig) ModelName ¶
func (m *WorkCalendarConfig) ModelName() string
func (*WorkCalendarConfig) Pointers ¶
func (m *WorkCalendarConfig) Pointers() []any
func (*WorkCalendarConfig) Schema ¶
func (m *WorkCalendarConfig) Schema() []model.Field
func (*WorkCalendarConfig) Validate ¶
func (m *WorkCalendarConfig) Validate(action byte) error
type WorkCalendarConfigList ¶
type WorkCalendarConfigList []*WorkCalendarConfig
func ReadAllWorkCalendarConfig ¶
func ReadAllWorkCalendarConfig(qb *orm.QB) (WorkCalendarConfigList, error)
func (*WorkCalendarConfigList) Append ¶
func (s *WorkCalendarConfigList) Append() model.Fielder
func (*WorkCalendarConfigList) DecodeFields ¶
func (s *WorkCalendarConfigList) DecodeFields(_ model.FieldReader)
func (*WorkCalendarConfigList) EncodeFields ¶
func (s *WorkCalendarConfigList) EncodeFields(_ model.FieldWriter)
func (*WorkCalendarConfigList) IsNil ¶
func (s *WorkCalendarConfigList) IsNil() bool
func (*WorkCalendarConfigList) Len ¶
func (s *WorkCalendarConfigList) Len() int
func (*WorkCalendarConfigList) Pointers ¶
func (s *WorkCalendarConfigList) Pointers() []any
func (*WorkCalendarConfigList) Schema ¶
func (s *WorkCalendarConfigList) Schema() []model.Field
type WorkCalendarException ¶
type WorkCalendarException struct {
Id string
TenantId string
StaffId string
SpecificDate int64
ExceptionType string
StartTime int64
EndTime int64
Notes string
}
func ReadOneWorkCalendarException ¶
func ReadOneWorkCalendarException(qb *orm.QB, model *WorkCalendarException) (*WorkCalendarException, error)
func (*WorkCalendarException) DecodeFields ¶
func (m *WorkCalendarException) DecodeFields(r model.FieldReader)
func (*WorkCalendarException) EncodeFields ¶
func (m *WorkCalendarException) EncodeFields(w model.FieldWriter)
func (*WorkCalendarException) IsNil ¶
func (m *WorkCalendarException) IsNil() bool
func (*WorkCalendarException) ModelName ¶
func (m *WorkCalendarException) ModelName() string
func (*WorkCalendarException) Pointers ¶
func (m *WorkCalendarException) Pointers() []any
func (*WorkCalendarException) Schema ¶
func (m *WorkCalendarException) Schema() []model.Field
func (*WorkCalendarException) Validate ¶
func (m *WorkCalendarException) Validate(action byte) error
type WorkCalendarExceptionList ¶
type WorkCalendarExceptionList []*WorkCalendarException
func ReadAllWorkCalendarException ¶
func ReadAllWorkCalendarException(qb *orm.QB) (WorkCalendarExceptionList, error)
func (*WorkCalendarExceptionList) Append ¶
func (s *WorkCalendarExceptionList) Append() model.Fielder
func (*WorkCalendarExceptionList) DecodeFields ¶
func (s *WorkCalendarExceptionList) DecodeFields(_ model.FieldReader)
func (*WorkCalendarExceptionList) EncodeFields ¶
func (s *WorkCalendarExceptionList) EncodeFields(_ model.FieldWriter)
func (*WorkCalendarExceptionList) IsNil ¶
func (s *WorkCalendarExceptionList) IsNil() bool
func (*WorkCalendarExceptionList) Len ¶
func (s *WorkCalendarExceptionList) Len() int
func (*WorkCalendarExceptionList) Pointers ¶
func (s *WorkCalendarExceptionList) Pointers() []any
func (*WorkCalendarExceptionList) Schema ¶
func (s *WorkCalendarExceptionList) Schema() []model.Field
type WorkCalendarWeekly ¶
type WorkCalendarWeekly struct {
Id string
TenantId string
StaffId string
DayOfWeek int64
WorkStart int64
WorkFinish int64
BreakStart int64
BreakFinish int64
IsActive bool
}
func ReadOneWorkCalendarWeekly ¶
func ReadOneWorkCalendarWeekly(qb *orm.QB, model *WorkCalendarWeekly) (*WorkCalendarWeekly, error)
func (*WorkCalendarWeekly) DecodeFields ¶
func (m *WorkCalendarWeekly) DecodeFields(r model.FieldReader)
func (*WorkCalendarWeekly) EncodeFields ¶
func (m *WorkCalendarWeekly) EncodeFields(w model.FieldWriter)
func (*WorkCalendarWeekly) IsNil ¶
func (m *WorkCalendarWeekly) IsNil() bool
func (*WorkCalendarWeekly) ModelName ¶
func (m *WorkCalendarWeekly) ModelName() string
func (*WorkCalendarWeekly) Pointers ¶
func (m *WorkCalendarWeekly) Pointers() []any
func (*WorkCalendarWeekly) Schema ¶
func (m *WorkCalendarWeekly) Schema() []model.Field
func (*WorkCalendarWeekly) Validate ¶
func (m *WorkCalendarWeekly) Validate(action byte) error
type WorkCalendarWeeklyList ¶
type WorkCalendarWeeklyList []*WorkCalendarWeekly
func ReadAllWorkCalendarWeekly ¶
func ReadAllWorkCalendarWeekly(qb *orm.QB) (WorkCalendarWeeklyList, error)
func (*WorkCalendarWeeklyList) Append ¶
func (s *WorkCalendarWeeklyList) Append() model.Fielder
func (*WorkCalendarWeeklyList) DecodeFields ¶
func (s *WorkCalendarWeeklyList) DecodeFields(_ model.FieldReader)
func (*WorkCalendarWeeklyList) EncodeFields ¶
func (s *WorkCalendarWeeklyList) EncodeFields(_ model.FieldWriter)
func (*WorkCalendarWeeklyList) IsNil ¶
func (s *WorkCalendarWeeklyList) IsNil() bool
func (*WorkCalendarWeeklyList) Len ¶
func (s *WorkCalendarWeeklyList) Len() int
func (*WorkCalendarWeeklyList) Pointers ¶
func (s *WorkCalendarWeeklyList) Pointers() []any
func (*WorkCalendarWeeklyList) Schema ¶
func (s *WorkCalendarWeeklyList) Schema() []model.Field