All tables
tables · table

sftmas

The sftmas table serves as the Shift Master repository within the system. It defines the operating hours for various work shifts (e.g., General Shift, Morning Shift, Night Shift) identified by a company code and a shift name. This table is primarily used for workforce management, attendance validation, and production scheduling.

Row count
4
Last entry
Source
tables

Columns

5
ColumnTypeNullableMeaning
indexintegerNOPrimary key; internal row identifier.
compcodestringYESUnique identifier for the company or branch.
sft_namestringYESThe alphanumeric designation for the shift.
time_frnumberYESThe starting hour of the shift (24-hour format).
time_tonumberYESThe ending hour of the shift (24-hour format).

Full documentation

### 1) Overview
 The `sftmas` table serves as the **Shift Master** repository within the system. It defines the operating hours for various work shifts (e.g., General Shift, Morning Shift, Night Shift) identified by a company code and a shift name. This table is primarily used for workforce management, attendance validation, and production scheduling.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary key; internal row identifier. | | `PRIMARY KEY` |
 | **compcode** | string | YES | Unique identifier for the company or branch. | "DAS" | `JOIN`, `WHERE` |
 | **sft_name** | string | YES | The alphanumeric designation for the shift. | "A", "B", "C", "G" | `JOIN`, `GROUP BY` |
 | **time_fr** | number | YES | The starting hour of the shift (24-hour format). | 8.0, 9.0, 19.0 | `FILTER` |
 | **time_to** | number | YES | The ending hour of the shift (24-hour format). | 7.0, 19.0 | `FILTER` |
 
 ### 3) Relationships & Join Map
 
 The `sftmas` table acts as a reference for employee scheduling and attendance records. Based on the `SCHEMA_MAP`, the following joins are physically supported:
 
 #### Primary Joins
 * **dbo.empshift**: Joins on `compcode` and `sft_name`. This relationship assigns specific shifts defined in `sftmas` to individual employees.
 * **dbo.attandence**: Likely joins on `compcode` and `shift` (mapping to `sft_name`) to validate if clock-in times align with master shift definitions.
 
 #### Contextual Joins (Likely)
 * **dbo.CompanyConfig**: Joins on `compcode` to retrieve company-specific shift parameters.
 * **dbo.RMproduct1** / **dbo.product2**: Joins on `compcode` and `shift` (mapping to `sft_name`) to report production output by the specific shift defined here.
 
 ---