tables · table
mactypemas
The mactypemas table serves as the Machine Type/Group Master within the ERP system. It defines the high-level classifications or "Sections" of machinery (e.g., CNC, VMC, Cutting, Forging). This table is primarily used for reporting, categorization in OEE (Overall Equipment Effectiveness) calculations, and linking specific machines to their functional departments or groups.
Row count
14
Last entry
—
Source
tables
Columns
5| Column | Type | Nullable | Meaning |
|---|---|---|---|
compcode | string | NO | Unique identifier for the company/branch. |
maccode | string | NO | Unique short code for the machine group or type. |
macname | string | YES | Descriptive name of the machine section or group. |
username | string | YES | The system user who created or last modified the record. |
index | integer | NO | Internal database row index (Pandas/Import metadata). |
Full documentation
### 1) Overview The `mactypemas` table serves as the **Machine Type/Group Master** within the ERP system. It defines the high-level classifications or "Sections" of machinery (e.g., CNC, VMC, Cutting, Forging). This table is primarily used for reporting, categorization in OEE (Overall Equipment Effectiveness) calculations, and linking specific machines to their functional departments or groups. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **compcode** | string | NO | Unique identifier for the company/branch. | e.g., "DAS", "AFM", "BPL" | Used in composite joins for multi-tenant data isolation. | | **maccode** | string | NO | Unique short code for the machine group or type. | e.g., "CNC", "VMC", "FORG" | **Primary Key.** Joins to `machine.macgroup`. | | **macname** | string | YES | Descriptive name of the machine section or group. | e.g., "C.N.C SECTION", "FORGING" | Display label for reports and UI headers. | | **username** | string | YES | The system user who created or last modified the record. | e.g., "system", "dharamveer" | Audit trailing. | | **index** | integer | NO | Internal database row index (Pandas/Import metadata). | | Not usually used in business logic. | ### 3) Relationships & Join Map The `mactypemas` table acts as a parent lookup table for machine-specific metadata. #### Primary Joins (Confirmed via SCHEMA_MAP & REFERENCE_JSON) * **dbo.machine** * `mactypemas.maccode` = `machine.macgroup` * `mactypemas.compcode` = `machine.compcode` * *Context:* Maps individual machines to their broader categories (e.g., specific CNC machine 'ADDA01' belongs to group 'CNC'). * **dbo.itemopr** * `mactypemas.maccode` = `itemopr.maccode` * `mactypemas.compcode` = `itemopr.compcode` * *Context:* Defines which machine type/group is required for a specific item operation. * **dbo.itemoprprod** * `mactypemas.maccode` = `itemoprprod.maccode` * `mactypemas.compcode` = `itemoprprod.compcode` * *Context:* Links production operations to machine types for routing. #### Likely Joins (Inferred) * **dbo.machineitem** * `mactypemas.maccode` (via machine join) * *Context:* Used in procedures like `OnProcesNextOprQtyHz` to determine which machine group handles specific item-op pairings.