final_project 12.17
Tables (6)
Machine (machine)
- id (PK) — INTEGER — Primary key — NOT NULL
- UserId (FK) — INTEGER — Foreign key → User.id — NOT NULL
- machine_name (Field) — STRING — NOT NULL — unique
- machine_status (Field2) — BOOLEAN — NOT NULL — 0: 대기, 1: 동작, 2:고장
- machine_image (Field3) — STRING — NOT NULL
- mqtt_host (Field4) — STRING
- mqtt_name (Field5) — STRING
- mqtt_topic (Field6) — STRING
- createdAt (Field7) — DATETIME — NOT NULL
- updatedAt (Field8) — DATETIME — NOT NULL
- deletedAt (Field9) — DATETIME
- information (Field10) — STRING — NOT NULL
Part (part)
- id (PK) — INTEGER — Primary key — NOT NULL
- MachineId (FK) — INTEGER — Foreign key → Machine.id — NOT NULL
- Part_defaultId (FK2) — INTEGER — Foreign key → Part_default.id — NOT NULL
- count (Field) — INTEGER — NOT NULL
- createdAt (Field2) — DATETIME — NOT NULL
- updatedAt (Field3) — DATETIME — NOT NULL
- deletedAt (Field4) — DATETIME
Part_default (part_default)
- id (PK) — INTEGER — Primary key — NOT NULL
- part_type (Field) — INTEGER — NOT NULL
- max_life (Field2) — INTEGER — NOT NULL
- createdAt (Field3) — DATETIME — NOT NULL
- updatedAt (Field4) — DATETIME — NOT NULL
- deletedAt (Field5) — DATETIME
Software_history (software_history)
- id (PK) — INTEGER — Primary key — NOT NULL
- MachindId (FK) — INTEGER — Foreign key → Machine.id — NOT NULL
- part_type (Field) — INTEGER — NOT NULL
- software_version (Field2) — STRING — NOT NULL
- detail (Field3) — STRING
- createdAt (Field4) — DATETIME — NOT NULL
- updatedAt (Field5) — DATETIME — NOT NULL
- deletedAt (Field6) — DATETIME
Test_result (test_result)
- id (PK) — INTEGER — Primary key — NOT NULL
- MachineId (FK) — INTEGER — Foreign key → Machine.id — NOT NULL
- serial_number (Field) — STRING — NOT NULL — 제품번호
- final_result (Field2) — STRING — NOT NULL — 1: 양품, 2: 고품
- createdAt (Field3) — DATETIME — NOT NULL
- updatedAt (Field4) — DATETIME — NOT NULL
- deletedAt (Field5) — DATETIME
- dice_num (Field6) — INTEGER
- description (Field7) — STRING
User (user)
- id (PK) — INTEGER — Primary key — NOT NULL
- employee_number (Field) — INTEGER — NOT NULL
- email (Field2) — STRING — NOT NULL
- name (Field3) — STRING — NOT NULL
- password (Field4) — STRING — NOT NULL
- authorization (Field5) — STRING — NOT NULL — 'user', 'admin'
- createdAt (Field6) — DATETIME — NOT NULL
- updatedAt (Field7) — DATETIME — NOT NULL
- deletedAt (Field8) — DATETIME
- phone_number (Field9) — STRING
- user_image (Field10) — STRING