Documentation
¶
Index ¶
- Constants
- Variables
- func NewBusinessHoursView(caller router.Caller) view.Presenter
- func NewClosuresView(caller router.Caller) view.Presenter
- func NewHolidaysView(caller router.Caller) view.Presenter
- type AddClosureArgs
- func (m *AddClosureArgs) DecodeFields(r model.FieldReader)
- func (m *AddClosureArgs) EncodeFields(w model.FieldWriter)
- func (m *AddClosureArgs) IsNil() bool
- func (m *AddClosureArgs) ModelName() string
- func (m *AddClosureArgs) Pointers() []any
- func (m *AddClosureArgs) Schema() []model.Field
- func (m *AddClosureArgs) Validate(action byte) error
- type AddClosureArgsList
- func (s *AddClosureArgsList) Append() model.Fielder
- func (s *AddClosureArgsList) At(i int) model.Fielder
- func (s *AddClosureArgsList) DecodeFields(_ model.FieldReader)
- func (s *AddClosureArgsList) EncodeFields(_ model.FieldWriter)
- func (s *AddClosureArgsList) IsNil() bool
- func (s *AddClosureArgsList) Len() int
- func (s *AddClosureArgsList) Pointers() []any
- func (s *AddClosureArgsList) Schema() []model.Field
- type AddHolidayArgs
- func (m *AddHolidayArgs) DecodeFields(r model.FieldReader)
- func (m *AddHolidayArgs) EncodeFields(w model.FieldWriter)
- func (m *AddHolidayArgs) IsNil() bool
- func (m *AddHolidayArgs) ModelName() string
- func (m *AddHolidayArgs) Pointers() []any
- func (m *AddHolidayArgs) Schema() []model.Field
- func (m *AddHolidayArgs) Validate(action byte) error
- type AddHolidayArgsList
- func (s *AddHolidayArgsList) Append() model.Fielder
- func (s *AddHolidayArgsList) At(i int) model.Fielder
- func (s *AddHolidayArgsList) DecodeFields(_ model.FieldReader)
- func (s *AddHolidayArgsList) EncodeFields(_ model.FieldWriter)
- func (s *AddHolidayArgsList) IsNil() bool
- func (s *AddHolidayArgsList) Len() int
- func (s *AddHolidayArgsList) Pointers() []any
- func (s *AddHolidayArgsList) Schema() []model.Field
- type BusinessHours
- func (m *BusinessHours) DecodeFields(r model.FieldReader)
- func (m *BusinessHours) EncodeFields(w model.FieldWriter)
- func (m *BusinessHours) IsNil() bool
- func (r *BusinessHours) Item() view.Item
- func (m *BusinessHours) ModelName() string
- func (m *BusinessHours) Pointers() []any
- func (m *BusinessHours) Schema() []model.Field
- func (m *BusinessHours) Validate(action byte) error
- type BusinessHoursList
- func (s *BusinessHoursList) Append() model.Fielder
- func (s *BusinessHoursList) At(i int) model.Fielder
- func (s *BusinessHoursList) DecodeFields(_ model.FieldReader)
- func (s *BusinessHoursList) EncodeFields(_ model.FieldWriter)
- func (s *BusinessHoursList) IsNil() bool
- func (s *BusinessHoursList) Len() int
- func (s *BusinessHoursList) Pointers() []any
- func (s *BusinessHoursList) Schema() []model.Field
- type CalendarChangedPayload
- type ClosedReason
- type Closure
- func (m *Closure) DecodeFields(r model.FieldReader)
- func (m *Closure) EncodeFields(w model.FieldWriter)
- func (m *Closure) IsNil() bool
- func (c *Closure) Item() view.Item
- func (m *Closure) ModelName() string
- func (m *Closure) Pointers() []any
- func (m *Closure) Schema() []model.Field
- func (m *Closure) Validate(action byte) error
- type ClosureList
- func (s *ClosureList) Append() model.Fielder
- func (s *ClosureList) At(i int) model.Fielder
- func (s *ClosureList) DecodeFields(_ model.FieldReader)
- func (s *ClosureList) EncodeFields(_ model.FieldWriter)
- func (s *ClosureList) IsNil() bool
- func (s *ClosureList) Len() int
- func (s *ClosureList) Pointers() []any
- func (s *ClosureList) Schema() []model.Field
- type DayDetail
- type Deps
- type GetDayBoundsArgs
- func (m *GetDayBoundsArgs) DecodeFields(r model.FieldReader)
- func (m *GetDayBoundsArgs) EncodeFields(w model.FieldWriter)
- func (m *GetDayBoundsArgs) IsNil() bool
- func (m *GetDayBoundsArgs) ModelName() string
- func (m *GetDayBoundsArgs) Pointers() []any
- func (m *GetDayBoundsArgs) Schema() []model.Field
- func (m *GetDayBoundsArgs) Validate(action byte) error
- type GetDayBoundsArgsList
- func (s *GetDayBoundsArgsList) Append() model.Fielder
- func (s *GetDayBoundsArgsList) At(i int) model.Fielder
- func (s *GetDayBoundsArgsList) DecodeFields(_ model.FieldReader)
- func (s *GetDayBoundsArgsList) EncodeFields(_ model.FieldWriter)
- func (s *GetDayBoundsArgsList) IsNil() bool
- func (s *GetDayBoundsArgsList) Len() int
- func (s *GetDayBoundsArgsList) Pointers() []any
- func (s *GetDayBoundsArgsList) Schema() []model.Field
- type Holiday
- func (m *Holiday) DecodeFields(r model.FieldReader)
- func (m *Holiday) EncodeFields(w model.FieldWriter)
- func (m *Holiday) IsNil() bool
- func (h *Holiday) Item() view.Item
- func (m *Holiday) ModelName() string
- func (m *Holiday) Pointers() []any
- func (m *Holiday) Schema() []model.Field
- func (m *Holiday) Validate(action byte) error
- type HolidayList
- func (s *HolidayList) Append() model.Fielder
- func (s *HolidayList) At(i int) model.Fielder
- func (s *HolidayList) DecodeFields(_ model.FieldReader)
- func (s *HolidayList) EncodeFields(_ model.FieldWriter)
- func (s *HolidayList) IsNil() bool
- func (s *HolidayList) Len() int
- func (s *HolidayList) Pointers() []any
- func (s *HolidayList) Schema() []model.Field
- type ListClosuresArgs
- func (m *ListClosuresArgs) DecodeFields(r model.FieldReader)
- func (m *ListClosuresArgs) EncodeFields(w model.FieldWriter)
- func (m *ListClosuresArgs) IsNil() bool
- func (m *ListClosuresArgs) ModelName() string
- func (m *ListClosuresArgs) Pointers() []any
- func (m *ListClosuresArgs) Schema() []model.Field
- func (m *ListClosuresArgs) Validate(action byte) error
- type ListClosuresArgsList
- func (s *ListClosuresArgsList) Append() model.Fielder
- func (s *ListClosuresArgsList) At(i int) model.Fielder
- func (s *ListClosuresArgsList) DecodeFields(_ model.FieldReader)
- func (s *ListClosuresArgsList) EncodeFields(_ model.FieldWriter)
- func (s *ListClosuresArgsList) IsNil() bool
- func (s *ListClosuresArgsList) Len() int
- func (s *ListClosuresArgsList) Pointers() []any
- func (s *ListClosuresArgsList) Schema() []model.Field
- type ListHolidaysArgs
- func (m *ListHolidaysArgs) DecodeFields(r model.FieldReader)
- func (m *ListHolidaysArgs) EncodeFields(w model.FieldWriter)
- func (m *ListHolidaysArgs) IsNil() bool
- func (m *ListHolidaysArgs) ModelName() string
- func (m *ListHolidaysArgs) Pointers() []any
- func (m *ListHolidaysArgs) Schema() []model.Field
- func (m *ListHolidaysArgs) Validate(action byte) error
- type ListHolidaysArgsList
- func (s *ListHolidaysArgsList) Append() model.Fielder
- func (s *ListHolidaysArgsList) At(i int) model.Fielder
- func (s *ListHolidaysArgsList) DecodeFields(_ model.FieldReader)
- func (s *ListHolidaysArgsList) EncodeFields(_ model.FieldWriter)
- func (s *ListHolidaysArgsList) IsNil() bool
- func (s *ListHolidaysArgsList) Len() int
- func (s *ListHolidaysArgsList) Pointers() []any
- func (s *ListHolidaysArgsList) Schema() []model.Field
- type Module
- func (m *Module) AddClosure(c Closure) error
- func (m *Module) AddHoliday(h Holiday) error
- func (m *Module) GetDayBounds(date int64) (tinytime.DayBounds, error)
- func (m *Module) GetDayDetail(date int64) (DayDetail, error)
- func (m *Module) ListBusinessHours() ([]BusinessHours, error)
- func (m *Module) ListClosures(from, to int64) ([]Closure, error)
- func (m *Module) ListHolidays(from, to int64) ([]Holiday, error)
- func (m *Module) ModelName() string
- func (m *Module) MountOperations(reg router.OperationRegistry)
- func (m *Module) RemoveClosure(id string) error
- func (m *Module) RemoveHoliday(id string) error
- func (m *Module) UpsertBusinessHours(h BusinessHours) error
- type Reader
- type RemoveClosureArgs
- func (m *RemoveClosureArgs) DecodeFields(r model.FieldReader)
- func (m *RemoveClosureArgs) EncodeFields(w model.FieldWriter)
- func (m *RemoveClosureArgs) IsNil() bool
- func (m *RemoveClosureArgs) ModelName() string
- func (m *RemoveClosureArgs) Pointers() []any
- func (m *RemoveClosureArgs) Schema() []model.Field
- func (m *RemoveClosureArgs) Validate(action byte) error
- type RemoveClosureArgsList
- func (s *RemoveClosureArgsList) Append() model.Fielder
- func (s *RemoveClosureArgsList) At(i int) model.Fielder
- func (s *RemoveClosureArgsList) DecodeFields(_ model.FieldReader)
- func (s *RemoveClosureArgsList) EncodeFields(_ model.FieldWriter)
- func (s *RemoveClosureArgsList) IsNil() bool
- func (s *RemoveClosureArgsList) Len() int
- func (s *RemoveClosureArgsList) Pointers() []any
- func (s *RemoveClosureArgsList) Schema() []model.Field
- type RemoveHolidayArgs
- func (m *RemoveHolidayArgs) DecodeFields(r model.FieldReader)
- func (m *RemoveHolidayArgs) EncodeFields(w model.FieldWriter)
- func (m *RemoveHolidayArgs) IsNil() bool
- func (m *RemoveHolidayArgs) ModelName() string
- func (m *RemoveHolidayArgs) Pointers() []any
- func (m *RemoveHolidayArgs) Schema() []model.Field
- func (m *RemoveHolidayArgs) Validate(action byte) error
- type RemoveHolidayArgsList
- func (s *RemoveHolidayArgsList) Append() model.Fielder
- func (s *RemoveHolidayArgsList) At(i int) model.Fielder
- func (s *RemoveHolidayArgsList) DecodeFields(_ model.FieldReader)
- func (s *RemoveHolidayArgsList) EncodeFields(_ model.FieldWriter)
- func (s *RemoveHolidayArgsList) IsNil() bool
- func (s *RemoveHolidayArgsList) Len() int
- func (s *RemoveHolidayArgsList) Pointers() []any
- func (s *RemoveHolidayArgsList) Schema() []model.Field
- type UpsertBusinessHoursArgs
- func (m *UpsertBusinessHoursArgs) DecodeFields(r model.FieldReader)
- func (m *UpsertBusinessHoursArgs) EncodeFields(w model.FieldWriter)
- func (m *UpsertBusinessHoursArgs) IsNil() bool
- func (m *UpsertBusinessHoursArgs) ModelName() string
- func (m *UpsertBusinessHoursArgs) Pointers() []any
- func (m *UpsertBusinessHoursArgs) Schema() []model.Field
- func (m *UpsertBusinessHoursArgs) Validate(action byte) error
- type UpsertBusinessHoursArgsList
- func (s *UpsertBusinessHoursArgsList) Append() model.Fielder
- func (s *UpsertBusinessHoursArgsList) At(i int) model.Fielder
- func (s *UpsertBusinessHoursArgsList) DecodeFields(_ model.FieldReader)
- func (s *UpsertBusinessHoursArgsList) EncodeFields(_ model.FieldWriter)
- func (s *UpsertBusinessHoursArgsList) IsNil() bool
- func (s *UpsertBusinessHoursArgsList) Len() int
- func (s *UpsertBusinessHoursArgsList) Pointers() []any
- func (s *UpsertBusinessHoursArgsList) Schema() []model.Field
Constants ¶
const ( CalendarKindBusinessHours = "BUSINESS_HOURS" CalendarKindHoliday = "HOLIDAY" CalendarKindClosure = "CLOSURE" )
Payload kinds — the ONLY place these literals live. CalendarChangedPayload.Kind carries one of them.
const ( OpListBusinessHours = "list_business_hours" OpUpsertBusinessHours = "upsert_business_hours" OpListHolidays = "list_holidays" OpAddHoliday = "add_holiday" OpRemoveHoliday = "remove_holiday" OpListClosures = "list_closures" OpAddClosure = "add_closure" OpRemoveClosure = "remove_closure" OpGetDayBounds = "get_day_bounds" )
const EventCalendarChanged = "business.calendar.changed"
EventCalendarChanged fires on every write. appointment_booking subscribes so a professional's editor reflects widened hours without a recompile (CU-03), a new holiday closes the day for everyone (CU-04), and reservations already booked on a day that just became closed are recomputed into conflict.
Variables ¶
var ( ErrNotFound = fmt.Err("business_calendar: record not found") ErrInvalidDay = fmt.Err("business_calendar: day_of_week must be 0..6") ErrInvalidMinutes = fmt.Err("business_calendar: minutes must be 0..1439 and open_min < close_min") ErrDuplicateDate = fmt.Err("business_calendar: a record already exists for that date") )
var AddClosureArgsModel = model.Definition{ Name: "add_closure_args", Fields: model.Fields{ {Name: "specific_date", Type: model.Int()}, {Name: "reason", Type: model.Text(), NotNull: true}, }, }
var AddHolidayArgsModel = model.Definition{ Name: "add_holiday_args", Fields: model.Fields{ {Name: "specific_date", Type: model.Int()}, {Name: "name", Type: model.Text(), NotNull: true}, {Name: "notes", Type: model.Text()}, }, }
var BusinessHoursModel = model.Definition{ Name: "business_hours", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "day_of_week", Type: model.Int(), NotNull: true, DB: &model.FieldDB{Unique: true}}, {Name: "open_min", Type: model.Int(), NotNull: true}, {Name: "close_min", Type: model.Int(), NotNull: true}, {Name: "is_open", Type: model.Bool(), NotNull: true}, {Name: "notes", Type: model.Text()}, {Name: "updated_at", Type: model.Int(), NotNull: true}, }, }
BusinessHoursModel: one row per day of week. day_of_week is unique — this module never writes more than seven rows.
Times are MINUTES FROM MIDNIGHT (0..1439), the same encoding appointment_booking uses for work blocks. The archived business_hours module stored clock-time text and forced a conversion at the one boundary that has to compare the two; the encoding is fixed here instead.
var BusinessHours_ = struct { Id string DayOfWeek string OpenMin string CloseMin string IsOpen string Notes string UpdatedAt string }{ Id: "id", DayOfWeek: "day_of_week", OpenMin: "open_min", CloseMin: "close_min", IsOpen: "is_open", Notes: "notes", UpdatedAt: "updated_at", }
var ClosureModel = model.Definition{ Name: "closure", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "specific_date", Type: model.Int(), NotNull: true}, {Name: "reason", Type: model.Text(), NotNull: true}, {Name: "updated_at", Type: model.Int(), NotNull: true}, }, }
ClosureModel: a dated closure the establishment itself decided (maintenance, an event). Separate from Holiday because the ORIGIN is what the UI shows and what an administrator filters by — collapsing both into one table with a "type" column would make the origin a magic string.
var Closure_ = struct { Id string SpecificDate string Reason string UpdatedAt string }{ Id: "id", SpecificDate: "specific_date", Reason: "reason", UpdatedAt: "updated_at", }
var GetDayBoundsArgsModel = model.Definition{ Name: "get_day_bounds_args", Fields: model.Fields{ {Name: "date", Type: model.Int()}, }, }
var HolidayModel = model.Definition{ Name: "holiday", Fields: model.Fields{ {Name: "id", Type: model.Text(), DB: &model.FieldDB{PK: true}}, {Name: "specific_date", Type: model.Int(), NotNull: true}, {Name: "name", Type: model.Text(), NotNull: true}, {Name: "notes", Type: model.Text()}, {Name: "updated_at", Type: model.Int(), NotNull: true}, }, }
HolidayModel: a dated closure with a legal/administrative origin. Editable at runtime — a holiday that appears by law must never require a recompile.
var Holiday_ = struct { Id string SpecificDate string Name string Notes string UpdatedAt string }{ Id: "id", SpecificDate: "specific_date", Name: "name", Notes: "notes", UpdatedAt: "updated_at", }
var ListClosuresArgsModel = model.Definition{ Name: "list_closures_args", Fields: model.Fields{ {Name: "from", Type: model.Int()}, {Name: "to", Type: model.Int()}, }, }
var ListHolidaysArgsModel = model.Definition{ Name: "list_holidays_args", Fields: model.Fields{ {Name: "from", Type: model.Int()}, {Name: "to", Type: model.Int()}, }, }
var RemoveClosureArgsModel = model.Definition{ Name: "remove_closure_args", Fields: model.Fields{ {Name: "id", Type: model.Text(), NotNull: true}, }, }
var RemoveHolidayArgsModel = model.Definition{ Name: "remove_holiday_args", Fields: model.Fields{ {Name: "id", Type: model.Text(), NotNull: true}, }, }
var UpsertBusinessHoursArgsModel = model.Definition{ Name: "upsert_business_hours_args", Fields: model.Fields{ {Name: "day_of_week", Type: model.Int()}, {Name: "open_min", Type: model.Int()}, {Name: "close_min", Type: model.Int()}, {Name: "is_open", Type: model.Bool()}, {Name: "notes", Type: model.Text()}, }, }
Transport-only Args Definitions.
Constraints follow the harness's NotNull semantics: on a base int/bool kind, NotNull rejects the ZERO value (ValidateFields: NotNull && IsZeroPtr), so day_of_week 0 (Sunday), is_open false, or midnight (0 minutes) would be unrepresentable if NotNull were set here. Required ints are therefore enforced as DOMAIN rules in the service (ErrInvalidDay/ErrInvalidMinutes), the single fail-closed chokepoint every write path crosses; NotNull stays only on the text fields where empty is never legal.
Functions ¶
func NewBusinessHoursView ¶ added in v0.0.2
NewBusinessHoursView builds the weekly-hours Presenter — read + save (upsert). The app decides which renderer draws it.
func NewClosuresView ¶ added in v0.0.2
NewClosuresView builds the closures Presenter — full CRUD (list, add, remove).
Types ¶
type AddClosureArgs ¶ added in v0.0.2
func (*AddClosureArgs) DecodeFields ¶ added in v0.0.2
func (m *AddClosureArgs) DecodeFields(r model.FieldReader)
func (*AddClosureArgs) EncodeFields ¶ added in v0.0.2
func (m *AddClosureArgs) EncodeFields(w model.FieldWriter)
func (*AddClosureArgs) IsNil ¶ added in v0.0.2
func (m *AddClosureArgs) IsNil() bool
func (*AddClosureArgs) ModelName ¶ added in v0.0.2
func (m *AddClosureArgs) ModelName() string
func (*AddClosureArgs) Pointers ¶ added in v0.0.2
func (m *AddClosureArgs) Pointers() []any
func (*AddClosureArgs) Schema ¶ added in v0.0.2
func (m *AddClosureArgs) Schema() []model.Field
func (*AddClosureArgs) Validate ¶ added in v0.0.2
func (m *AddClosureArgs) Validate(action byte) error
type AddClosureArgsList ¶ added in v0.0.2
type AddClosureArgsList []*AddClosureArgs
func (*AddClosureArgsList) Append ¶ added in v0.0.2
func (s *AddClosureArgsList) Append() model.Fielder
func (*AddClosureArgsList) At ¶ added in v0.0.2
func (s *AddClosureArgsList) At(i int) model.Fielder
func (*AddClosureArgsList) DecodeFields ¶ added in v0.0.2
func (s *AddClosureArgsList) DecodeFields(_ model.FieldReader)
func (*AddClosureArgsList) EncodeFields ¶ added in v0.0.2
func (s *AddClosureArgsList) EncodeFields(_ model.FieldWriter)
func (*AddClosureArgsList) IsNil ¶ added in v0.0.2
func (s *AddClosureArgsList) IsNil() bool
func (*AddClosureArgsList) Len ¶ added in v0.0.2
func (s *AddClosureArgsList) Len() int
func (*AddClosureArgsList) Pointers ¶ added in v0.0.2
func (s *AddClosureArgsList) Pointers() []any
func (*AddClosureArgsList) Schema ¶ added in v0.0.2
func (s *AddClosureArgsList) Schema() []model.Field
type AddHolidayArgs ¶ added in v0.0.2
func (*AddHolidayArgs) DecodeFields ¶ added in v0.0.2
func (m *AddHolidayArgs) DecodeFields(r model.FieldReader)
func (*AddHolidayArgs) EncodeFields ¶ added in v0.0.2
func (m *AddHolidayArgs) EncodeFields(w model.FieldWriter)
func (*AddHolidayArgs) IsNil ¶ added in v0.0.2
func (m *AddHolidayArgs) IsNil() bool
func (*AddHolidayArgs) ModelName ¶ added in v0.0.2
func (m *AddHolidayArgs) ModelName() string
func (*AddHolidayArgs) Pointers ¶ added in v0.0.2
func (m *AddHolidayArgs) Pointers() []any
func (*AddHolidayArgs) Schema ¶ added in v0.0.2
func (m *AddHolidayArgs) Schema() []model.Field
func (*AddHolidayArgs) Validate ¶ added in v0.0.2
func (m *AddHolidayArgs) Validate(action byte) error
type AddHolidayArgsList ¶ added in v0.0.2
type AddHolidayArgsList []*AddHolidayArgs
func (*AddHolidayArgsList) Append ¶ added in v0.0.2
func (s *AddHolidayArgsList) Append() model.Fielder
func (*AddHolidayArgsList) At ¶ added in v0.0.2
func (s *AddHolidayArgsList) At(i int) model.Fielder
func (*AddHolidayArgsList) DecodeFields ¶ added in v0.0.2
func (s *AddHolidayArgsList) DecodeFields(_ model.FieldReader)
func (*AddHolidayArgsList) EncodeFields ¶ added in v0.0.2
func (s *AddHolidayArgsList) EncodeFields(_ model.FieldWriter)
func (*AddHolidayArgsList) IsNil ¶ added in v0.0.2
func (s *AddHolidayArgsList) IsNil() bool
func (*AddHolidayArgsList) Len ¶ added in v0.0.2
func (s *AddHolidayArgsList) Len() int
func (*AddHolidayArgsList) Pointers ¶ added in v0.0.2
func (s *AddHolidayArgsList) Pointers() []any
func (*AddHolidayArgsList) Schema ¶ added in v0.0.2
func (s *AddHolidayArgsList) Schema() []model.Field
type BusinessHours ¶ added in v0.0.2
type BusinessHours struct {
Id string
DayOfWeek int64
OpenMin int64
CloseMin int64
IsOpen bool
Notes string
UpdatedAt int64
}
func ReadOneBusinessHours ¶ added in v0.0.2
func ReadOneBusinessHours(qb *orm.QB, model *BusinessHours) (*BusinessHours, error)
func (*BusinessHours) DecodeFields ¶ added in v0.0.2
func (m *BusinessHours) DecodeFields(r model.FieldReader)
func (*BusinessHours) EncodeFields ¶ added in v0.0.2
func (m *BusinessHours) EncodeFields(w model.FieldWriter)
func (*BusinessHours) IsNil ¶ added in v0.0.2
func (m *BusinessHours) IsNil() bool
func (*BusinessHours) Item ¶ added in v0.0.2
func (r *BusinessHours) Item() view.Item
Item projects a BusinessHours row as a view.Item (view.Itemizer). The weekday label is rendered from the canonical English name (date.WeekdayName) through lang.Translate — this module hardcodes no human language; the consuming app registers the dictionary.
func (*BusinessHours) ModelName ¶ added in v0.0.2
func (m *BusinessHours) ModelName() string
func (*BusinessHours) Pointers ¶ added in v0.0.2
func (m *BusinessHours) Pointers() []any
func (*BusinessHours) Schema ¶ added in v0.0.2
func (m *BusinessHours) Schema() []model.Field
func (*BusinessHours) Validate ¶ added in v0.0.2
func (m *BusinessHours) Validate(action byte) error
type BusinessHoursList ¶ added in v0.0.2
type BusinessHoursList []*BusinessHours
func ReadAllBusinessHours ¶ added in v0.0.2
func ReadAllBusinessHours(qb *orm.QB) (BusinessHoursList, error)
func (*BusinessHoursList) Append ¶ added in v0.0.2
func (s *BusinessHoursList) Append() model.Fielder
func (*BusinessHoursList) DecodeFields ¶ added in v0.0.2
func (s *BusinessHoursList) DecodeFields(_ model.FieldReader)
func (*BusinessHoursList) EncodeFields ¶ added in v0.0.2
func (s *BusinessHoursList) EncodeFields(_ model.FieldWriter)
func (*BusinessHoursList) IsNil ¶ added in v0.0.2
func (s *BusinessHoursList) IsNil() bool
func (*BusinessHoursList) Len ¶ added in v0.0.2
func (s *BusinessHoursList) Len() int
func (*BusinessHoursList) Pointers ¶ added in v0.0.2
func (s *BusinessHoursList) Pointers() []any
func (*BusinessHoursList) Schema ¶ added in v0.0.2
func (s *BusinessHoursList) Schema() []model.Field
type CalendarChangedPayload ¶ added in v0.0.2
type CalendarChangedPayload struct {
// FromDate/ToDate bound the affected dates (midnight UTC seconds).
// For a holiday or closure both equal that single date. For a business
// hours change they are 0/0 — a weekly rule has no bounded range, and the
// subscriber must recompute its whole horizon.
FromDate int64
ToDate int64
// Kind names what moved, so a subscriber can skip work it does not care
// about. One of CalendarKindBusinessHours | CalendarKindHoliday |
// CalendarKindClosure.
Kind string
// Closed reports the direction. true when the change CLOSES time (a
// holiday added, hours narrowed) — the only direction that can invalidate
// an existing reservation. false when it opens time, which never does.
Closed bool
}
CalendarChangedPayload says WHAT changed, not merely that something did. A subscriber that only learns "the calendar changed" has to recompute every reservation of every professional; with the range it recomputes a window.
Implements model.Encodable, which events.Event.Payload requires.
func (*CalendarChangedPayload) DecodeFields ¶ added in v0.0.2
func (p *CalendarChangedPayload) DecodeFields(r model.FieldReader)
func (*CalendarChangedPayload) EncodeFields ¶ added in v0.0.2
func (p *CalendarChangedPayload) EncodeFields(w model.FieldWriter)
func (*CalendarChangedPayload) IsNil ¶ added in v0.0.2
func (p *CalendarChangedPayload) IsNil() bool
type ClosedReason ¶ added in v0.0.2
type ClosedReason string
ClosedReason names the origin of a closure. The string literals live ONLY in these constants — never inline at a call site.
const ( ClosedWeekly ClosedReason = "WEEKLY" // business_hours says closed that weekday ClosedHoliday ClosedReason = "HOLIDAY" // a Holiday row falls on that date ClosedLocal ClosedReason = "CLOSURE" // a Closure row falls on that date )
type Closure ¶ added in v0.0.2
func ReadOneClosure ¶ added in v0.0.2
func (*Closure) DecodeFields ¶ added in v0.0.2
func (m *Closure) DecodeFields(r model.FieldReader)
func (*Closure) EncodeFields ¶ added in v0.0.2
func (m *Closure) EncodeFields(w model.FieldWriter)
type ClosureList ¶ added in v0.0.2
type ClosureList []*Closure
func ReadAllClosure ¶ added in v0.0.2
func ReadAllClosure(qb *orm.QB) (ClosureList, error)
func (*ClosureList) Append ¶ added in v0.0.2
func (s *ClosureList) Append() model.Fielder
func (*ClosureList) DecodeFields ¶ added in v0.0.2
func (s *ClosureList) DecodeFields(_ model.FieldReader)
func (*ClosureList) EncodeFields ¶ added in v0.0.2
func (s *ClosureList) EncodeFields(_ model.FieldWriter)
func (*ClosureList) IsNil ¶ added in v0.0.2
func (s *ClosureList) IsNil() bool
func (*ClosureList) Len ¶ added in v0.0.2
func (s *ClosureList) Len() int
func (*ClosureList) Pointers ¶ added in v0.0.2
func (s *ClosureList) Pointers() []any
func (*ClosureList) Schema ¶ added in v0.0.2
func (s *ClosureList) Schema() []model.Field
type DayDetail ¶ added in v0.0.4
type DayDetail struct {
Bounds tinytime.DayBounds
// ClosedBy names why the day is closed. "" when Bounds.Open is true.
ClosedBy ClosedReason
}
DayDetail is this module's own answer for one date: the neutral bounds PLUS why a closed day is closed. ClosedBy is this module's vocabulary and never crosses to a neighbour — see Reader below.
It is an output-only result model: it implements model.Encodable so the get_day_bounds op can respond with it, and it is never a DB table.
func (*DayDetail) EncodeFields ¶ added in v0.0.4
func (d *DayDetail) EncodeFields(w model.FieldWriter)
type Deps ¶ added in v0.0.2
type Deps struct {
IDs model.IDGenerator
Publisher events.Publisher
}
Deps carries the injected collaborators a module may never construct itself. IDs is required; Publisher is optional — nil disables event publishing silently (no-op).
type GetDayBoundsArgs ¶ added in v0.0.2
type GetDayBoundsArgs struct {
Date int64
}
func (*GetDayBoundsArgs) DecodeFields ¶ added in v0.0.2
func (m *GetDayBoundsArgs) DecodeFields(r model.FieldReader)
func (*GetDayBoundsArgs) EncodeFields ¶ added in v0.0.2
func (m *GetDayBoundsArgs) EncodeFields(w model.FieldWriter)
func (*GetDayBoundsArgs) IsNil ¶ added in v0.0.2
func (m *GetDayBoundsArgs) IsNil() bool
func (*GetDayBoundsArgs) ModelName ¶ added in v0.0.2
func (m *GetDayBoundsArgs) ModelName() string
func (*GetDayBoundsArgs) Pointers ¶ added in v0.0.2
func (m *GetDayBoundsArgs) Pointers() []any
func (*GetDayBoundsArgs) Schema ¶ added in v0.0.2
func (m *GetDayBoundsArgs) Schema() []model.Field
func (*GetDayBoundsArgs) Validate ¶ added in v0.0.2
func (m *GetDayBoundsArgs) Validate(action byte) error
type GetDayBoundsArgsList ¶ added in v0.0.2
type GetDayBoundsArgsList []*GetDayBoundsArgs
func (*GetDayBoundsArgsList) Append ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) Append() model.Fielder
func (*GetDayBoundsArgsList) At ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) At(i int) model.Fielder
func (*GetDayBoundsArgsList) DecodeFields ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) DecodeFields(_ model.FieldReader)
func (*GetDayBoundsArgsList) EncodeFields ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) EncodeFields(_ model.FieldWriter)
func (*GetDayBoundsArgsList) IsNil ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) IsNil() bool
func (*GetDayBoundsArgsList) Len ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) Len() int
func (*GetDayBoundsArgsList) Pointers ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) Pointers() []any
func (*GetDayBoundsArgsList) Schema ¶ added in v0.0.2
func (s *GetDayBoundsArgsList) Schema() []model.Field
type Holiday ¶ added in v0.0.2
func ReadOneHoliday ¶ added in v0.0.2
func (*Holiday) DecodeFields ¶ added in v0.0.2
func (m *Holiday) DecodeFields(r model.FieldReader)
func (*Holiday) EncodeFields ¶ added in v0.0.2
func (m *Holiday) EncodeFields(w model.FieldWriter)
type HolidayList ¶ added in v0.0.2
type HolidayList []*Holiday
func ReadAllHoliday ¶ added in v0.0.2
func ReadAllHoliday(qb *orm.QB) (HolidayList, error)
func (*HolidayList) Append ¶ added in v0.0.2
func (s *HolidayList) Append() model.Fielder
func (*HolidayList) DecodeFields ¶ added in v0.0.2
func (s *HolidayList) DecodeFields(_ model.FieldReader)
func (*HolidayList) EncodeFields ¶ added in v0.0.2
func (s *HolidayList) EncodeFields(_ model.FieldWriter)
func (*HolidayList) IsNil ¶ added in v0.0.2
func (s *HolidayList) IsNil() bool
func (*HolidayList) Len ¶ added in v0.0.2
func (s *HolidayList) Len() int
func (*HolidayList) Pointers ¶ added in v0.0.2
func (s *HolidayList) Pointers() []any
func (*HolidayList) Schema ¶ added in v0.0.2
func (s *HolidayList) Schema() []model.Field
type ListClosuresArgs ¶ added in v0.0.2
func (*ListClosuresArgs) DecodeFields ¶ added in v0.0.2
func (m *ListClosuresArgs) DecodeFields(r model.FieldReader)
func (*ListClosuresArgs) EncodeFields ¶ added in v0.0.2
func (m *ListClosuresArgs) EncodeFields(w model.FieldWriter)
func (*ListClosuresArgs) IsNil ¶ added in v0.0.2
func (m *ListClosuresArgs) IsNil() bool
func (*ListClosuresArgs) ModelName ¶ added in v0.0.2
func (m *ListClosuresArgs) ModelName() string
func (*ListClosuresArgs) Pointers ¶ added in v0.0.2
func (m *ListClosuresArgs) Pointers() []any
func (*ListClosuresArgs) Schema ¶ added in v0.0.2
func (m *ListClosuresArgs) Schema() []model.Field
func (*ListClosuresArgs) Validate ¶ added in v0.0.2
func (m *ListClosuresArgs) Validate(action byte) error
type ListClosuresArgsList ¶ added in v0.0.2
type ListClosuresArgsList []*ListClosuresArgs
func (*ListClosuresArgsList) Append ¶ added in v0.0.2
func (s *ListClosuresArgsList) Append() model.Fielder
func (*ListClosuresArgsList) At ¶ added in v0.0.2
func (s *ListClosuresArgsList) At(i int) model.Fielder
func (*ListClosuresArgsList) DecodeFields ¶ added in v0.0.2
func (s *ListClosuresArgsList) DecodeFields(_ model.FieldReader)
func (*ListClosuresArgsList) EncodeFields ¶ added in v0.0.2
func (s *ListClosuresArgsList) EncodeFields(_ model.FieldWriter)
func (*ListClosuresArgsList) IsNil ¶ added in v0.0.2
func (s *ListClosuresArgsList) IsNil() bool
func (*ListClosuresArgsList) Len ¶ added in v0.0.2
func (s *ListClosuresArgsList) Len() int
func (*ListClosuresArgsList) Pointers ¶ added in v0.0.2
func (s *ListClosuresArgsList) Pointers() []any
func (*ListClosuresArgsList) Schema ¶ added in v0.0.2
func (s *ListClosuresArgsList) Schema() []model.Field
type ListHolidaysArgs ¶ added in v0.0.2
func (*ListHolidaysArgs) DecodeFields ¶ added in v0.0.2
func (m *ListHolidaysArgs) DecodeFields(r model.FieldReader)
func (*ListHolidaysArgs) EncodeFields ¶ added in v0.0.2
func (m *ListHolidaysArgs) EncodeFields(w model.FieldWriter)
func (*ListHolidaysArgs) IsNil ¶ added in v0.0.2
func (m *ListHolidaysArgs) IsNil() bool
func (*ListHolidaysArgs) ModelName ¶ added in v0.0.2
func (m *ListHolidaysArgs) ModelName() string
func (*ListHolidaysArgs) Pointers ¶ added in v0.0.2
func (m *ListHolidaysArgs) Pointers() []any
func (*ListHolidaysArgs) Schema ¶ added in v0.0.2
func (m *ListHolidaysArgs) Schema() []model.Field
func (*ListHolidaysArgs) Validate ¶ added in v0.0.2
func (m *ListHolidaysArgs) Validate(action byte) error
type ListHolidaysArgsList ¶ added in v0.0.2
type ListHolidaysArgsList []*ListHolidaysArgs
func (*ListHolidaysArgsList) Append ¶ added in v0.0.2
func (s *ListHolidaysArgsList) Append() model.Fielder
func (*ListHolidaysArgsList) At ¶ added in v0.0.2
func (s *ListHolidaysArgsList) At(i int) model.Fielder
func (*ListHolidaysArgsList) DecodeFields ¶ added in v0.0.2
func (s *ListHolidaysArgsList) DecodeFields(_ model.FieldReader)
func (*ListHolidaysArgsList) EncodeFields ¶ added in v0.0.2
func (s *ListHolidaysArgsList) EncodeFields(_ model.FieldWriter)
func (*ListHolidaysArgsList) IsNil ¶ added in v0.0.2
func (s *ListHolidaysArgsList) IsNil() bool
func (*ListHolidaysArgsList) Len ¶ added in v0.0.2
func (s *ListHolidaysArgsList) Len() int
func (*ListHolidaysArgsList) Pointers ¶ added in v0.0.2
func (s *ListHolidaysArgsList) Pointers() []any
func (*ListHolidaysArgsList) Schema ¶ added in v0.0.2
func (s *ListHolidaysArgsList) Schema() []model.Field
type Module ¶ added in v0.0.2
type Module struct {
// contains filtered or unexported fields
}
func (*Module) AddClosure ¶ added in v0.0.2
AddClosure registers a dated closure the establishment itself decided (maintenance, an event). Same-kind dates are unique, so a second closure on an already-closed-by-closure date is rejected with ErrDuplicateDate.
func (*Module) AddHoliday ¶ added in v0.0.2
AddHoliday registers a dated legal/administrative closure. A second row on the same date is rejected (ErrDuplicateDate) — a duplicated holiday would double-close a day and make RemoveHoliday look broken.
func (*Module) GetDayBounds ¶ added in v0.0.2
GetDayBounds is the Reader port: the neutral bounds only, no reason attached. Satisfies any sibling's own BoundsReader-shaped interface structurally.
func (*Module) GetDayDetail ¶ added in v0.0.4
GetDayDetail resolves the establishment's status for one date, INCLUDING why a closed day is closed. This is the single resolution path — GetBounds wraps it and simply discards ClosedBy for a Go-level consumer that never asked for it.
Resolution order, in this exact precedence:
- A Closure on that date → {Open: false, ClosedBy: ClosedLocal}.
- A Holiday on that date → {Open: false, ClosedBy: ClosedHoliday}.
- BusinessHours for that weekday with is_open == false → {Open: false, ClosedBy: ClosedWeekly}.
- Otherwise {Open: true, OpenMin, CloseMin}.
A local closure outranks a holiday because it is the more specific, more recent decision, and because a holiday the establishment chose to work through must not be reopened by removing the closure. A weekday with no business_hours row at all is closed (closed by default — the absence of a schedule never means open).
func (*Module) ListBusinessHours ¶ added in v0.0.2
func (m *Module) ListBusinessHours() ([]BusinessHours, error)
ListBusinessHours returns all seven weekday rules ordered by day_of_week. An empty week is a valid state (closed by default), not an error.
func (*Module) ListClosures ¶ added in v0.0.2
ListClosures returns closures in the range [from, to] (midnight UTC seconds, inclusive). A zero from/to means unbounded in that direction.
func (*Module) ListHolidays ¶ added in v0.0.2
ListHolidays returns holidays in the range [from, to] (midnight UTC seconds, inclusive). A zero from/to means unbounded in that direction.
func (*Module) MountOperations ¶ added in v0.0.2
func (m *Module) MountOperations(reg router.OperationRegistry)
func (*Module) RemoveClosure ¶ added in v0.0.2
RemoveClosure deletes a closure by id.
func (*Module) RemoveHoliday ¶ added in v0.0.2
RemoveHoliday deletes a holiday by id and reopens its day for booking.
func (*Module) UpsertBusinessHours ¶ added in v0.0.2
func (m *Module) UpsertBusinessHours(h BusinessHours) error
UpsertBusinessHours creates or updates the weekly rule for one weekday. A brand-new row can never invalidate existing availability (the day had no hours before, so it was already closed by default), so a create publishes Closed: false; only an update that narrows the window publishes Closed: true.
type Reader ¶ added in v0.0.2
type Reader interface {
// GetDayBounds answers "is the establishment open on this date, and
// between which minutes". date is midnight UTC in seconds.
GetDayBounds(date int64) (tinytime.DayBounds, error)
}
Reader is the READ-ONLY port this module's own consumers depend on — a convenience alias, not the contract a sibling domain module names.
A neighbour that only needs "is this date usable, and between which minutes" (e.g. veltylabs/appointment_booking) declares its OWN interface returning tinytime.DayBounds — a neutral leaf both sides already import — and this Module satisfies it structurally, with no adapter and no import in either direction. See webtyp/docs/AGENDA_DOMAIN_MASTER_PLAN.md §3-bis for why: a generic booking module must not depend on any specific institutional calendar.
type RemoveClosureArgs ¶ added in v0.0.2
type RemoveClosureArgs struct {
Id string
}
func (*RemoveClosureArgs) DecodeFields ¶ added in v0.0.2
func (m *RemoveClosureArgs) DecodeFields(r model.FieldReader)
func (*RemoveClosureArgs) EncodeFields ¶ added in v0.0.2
func (m *RemoveClosureArgs) EncodeFields(w model.FieldWriter)
func (*RemoveClosureArgs) IsNil ¶ added in v0.0.2
func (m *RemoveClosureArgs) IsNil() bool
func (*RemoveClosureArgs) ModelName ¶ added in v0.0.2
func (m *RemoveClosureArgs) ModelName() string
func (*RemoveClosureArgs) Pointers ¶ added in v0.0.2
func (m *RemoveClosureArgs) Pointers() []any
func (*RemoveClosureArgs) Schema ¶ added in v0.0.2
func (m *RemoveClosureArgs) Schema() []model.Field
func (*RemoveClosureArgs) Validate ¶ added in v0.0.2
func (m *RemoveClosureArgs) Validate(action byte) error
type RemoveClosureArgsList ¶ added in v0.0.2
type RemoveClosureArgsList []*RemoveClosureArgs
func (*RemoveClosureArgsList) Append ¶ added in v0.0.2
func (s *RemoveClosureArgsList) Append() model.Fielder
func (*RemoveClosureArgsList) At ¶ added in v0.0.2
func (s *RemoveClosureArgsList) At(i int) model.Fielder
func (*RemoveClosureArgsList) DecodeFields ¶ added in v0.0.2
func (s *RemoveClosureArgsList) DecodeFields(_ model.FieldReader)
func (*RemoveClosureArgsList) EncodeFields ¶ added in v0.0.2
func (s *RemoveClosureArgsList) EncodeFields(_ model.FieldWriter)
func (*RemoveClosureArgsList) IsNil ¶ added in v0.0.2
func (s *RemoveClosureArgsList) IsNil() bool
func (*RemoveClosureArgsList) Len ¶ added in v0.0.2
func (s *RemoveClosureArgsList) Len() int
func (*RemoveClosureArgsList) Pointers ¶ added in v0.0.2
func (s *RemoveClosureArgsList) Pointers() []any
func (*RemoveClosureArgsList) Schema ¶ added in v0.0.2
func (s *RemoveClosureArgsList) Schema() []model.Field
type RemoveHolidayArgs ¶ added in v0.0.2
type RemoveHolidayArgs struct {
Id string
}
func (*RemoveHolidayArgs) DecodeFields ¶ added in v0.0.2
func (m *RemoveHolidayArgs) DecodeFields(r model.FieldReader)
func (*RemoveHolidayArgs) EncodeFields ¶ added in v0.0.2
func (m *RemoveHolidayArgs) EncodeFields(w model.FieldWriter)
func (*RemoveHolidayArgs) IsNil ¶ added in v0.0.2
func (m *RemoveHolidayArgs) IsNil() bool
func (*RemoveHolidayArgs) ModelName ¶ added in v0.0.2
func (m *RemoveHolidayArgs) ModelName() string
func (*RemoveHolidayArgs) Pointers ¶ added in v0.0.2
func (m *RemoveHolidayArgs) Pointers() []any
func (*RemoveHolidayArgs) Schema ¶ added in v0.0.2
func (m *RemoveHolidayArgs) Schema() []model.Field
func (*RemoveHolidayArgs) Validate ¶ added in v0.0.2
func (m *RemoveHolidayArgs) Validate(action byte) error
type RemoveHolidayArgsList ¶ added in v0.0.2
type RemoveHolidayArgsList []*RemoveHolidayArgs
func (*RemoveHolidayArgsList) Append ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) Append() model.Fielder
func (*RemoveHolidayArgsList) At ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) At(i int) model.Fielder
func (*RemoveHolidayArgsList) DecodeFields ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) DecodeFields(_ model.FieldReader)
func (*RemoveHolidayArgsList) EncodeFields ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) EncodeFields(_ model.FieldWriter)
func (*RemoveHolidayArgsList) IsNil ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) IsNil() bool
func (*RemoveHolidayArgsList) Len ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) Len() int
func (*RemoveHolidayArgsList) Pointers ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) Pointers() []any
func (*RemoveHolidayArgsList) Schema ¶ added in v0.0.2
func (s *RemoveHolidayArgsList) Schema() []model.Field
type UpsertBusinessHoursArgs ¶ added in v0.0.2
type UpsertBusinessHoursArgs struct {
DayOfWeek int64
OpenMin int64
CloseMin int64
IsOpen bool
Notes string
}
func (*UpsertBusinessHoursArgs) DecodeFields ¶ added in v0.0.2
func (m *UpsertBusinessHoursArgs) DecodeFields(r model.FieldReader)
func (*UpsertBusinessHoursArgs) EncodeFields ¶ added in v0.0.2
func (m *UpsertBusinessHoursArgs) EncodeFields(w model.FieldWriter)
func (*UpsertBusinessHoursArgs) IsNil ¶ added in v0.0.2
func (m *UpsertBusinessHoursArgs) IsNil() bool
func (*UpsertBusinessHoursArgs) ModelName ¶ added in v0.0.2
func (m *UpsertBusinessHoursArgs) ModelName() string
func (*UpsertBusinessHoursArgs) Pointers ¶ added in v0.0.2
func (m *UpsertBusinessHoursArgs) Pointers() []any
func (*UpsertBusinessHoursArgs) Schema ¶ added in v0.0.2
func (m *UpsertBusinessHoursArgs) Schema() []model.Field
func (*UpsertBusinessHoursArgs) Validate ¶ added in v0.0.2
func (m *UpsertBusinessHoursArgs) Validate(action byte) error
type UpsertBusinessHoursArgsList ¶ added in v0.0.2
type UpsertBusinessHoursArgsList []*UpsertBusinessHoursArgs
func (*UpsertBusinessHoursArgsList) Append ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) Append() model.Fielder
func (*UpsertBusinessHoursArgsList) At ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) At(i int) model.Fielder
func (*UpsertBusinessHoursArgsList) DecodeFields ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) DecodeFields(_ model.FieldReader)
func (*UpsertBusinessHoursArgsList) EncodeFields ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) EncodeFields(_ model.FieldWriter)
func (*UpsertBusinessHoursArgsList) IsNil ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) IsNil() bool
func (*UpsertBusinessHoursArgsList) Len ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) Len() int
func (*UpsertBusinessHoursArgsList) Pointers ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) Pointers() []any
func (*UpsertBusinessHoursArgsList) Schema ¶ added in v0.0.2
func (s *UpsertBusinessHoursArgsList) Schema() []model.Field