An Opening Hour Group in T-Gate represents the comprehensive schedule of working hours for various entities within the system, such as branches and sections. It specifies the opening and closing times for each day of the week, ensuring that applications and customers are informed about the availability of services.
For more details on the hierarchical structure and how different entities relate to each other, please refer to General → Opening Hours Guides.
Model Attributes
Attribute | Description | Type |
---|---|---|
id | the unique identifier of that table entity | Integer |
start_date | For branch_special_timings, specify the starting date from which these opening hours will take effect, This attribute is mandatory in the case of special timings and Null otherwise | String in YYYY-MM-DD Format or NULL |
end_date | For branch_special_timings, specify the ending date from which these opening hours will stop taking effect, This attribute is mandatory in the case of special timings and Null otherwise | String in YYYY-MM-DD Format or NULL |
is_special_timing | Boolean attribute that specifies whether this opening_hour_group acts as a special timing that has start_date and end_date or is it a default_opening_hour that takes effect whenever no force_closure nor special_timings are active. | Boolean |
is_force_closed | For branch_special_timings, a boolean that represents the status of the special timing opening hour group, When an opening_hour_group is force closed, this means that it has no effect anymore on the status of its parent. | Boolean |
opening_hours | JSON Array that represents all days that this group operates in and the intervals on which it's considered open | Object |
Special Timings Vs Default Timings
An opening_hour_group can be a default_timing for a branch or a section, but it can also act as a branch_special_timing.
Default Timingsopening_hour_groups which acts as default (is_special_timing = false) for branches and sections are unique per there parents and can only be assigned under one entity (one_to_one relation).
Special Timingsopening_hour_groups which acts as special timings (is_special_timing = true) can be assigned under multiple branches and each branch can have more than one special timing (many_to_many relation). However, special timings cannot overlap for the same entity assigned on.
Opening Hours
an opening hour within an opening hour group represents all the information needed for a single working day.
Attribute | Description | Type |
---|---|---|
id | the unique identifier of that table entity | Integer |
week_day | the day of the week this opening hour describes | String Enum |
intervals | JSON Array that contains starts_at and ends_at attributes that represents all the time intervals on which the entity is considered open. | Object Array |
Opening HoursOpening Hours specifies working days only which means that if a day is not present in the opening_hour_group, this means that the entity is closed on that day.
week_dayweek_day is a string enum that can take one of the values: [saturday, sunday, monday, tuesday, wednesday, thursday, friday]