eGemco
Tables (9)
attachments
- id — BIGINT — Primary key — NOT NULL
- project_id — BIGINT — Foreign key → projects.id — NOT NULL
- research_note_id — BIGINT — Foreign key → research_notes.id
- uploaded_by_id — BIGINT — Foreign key → researchers.id — NOT NULL
- file_name — VARCHAR(255) — NOT NULL
- file_type — VARCHAR(100) — NOT NULL
- file_url — TEXT — NOT NULL
- attachment_type — VARCHAR(30) — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
clients
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(150) — NOT NULL
departments
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
materials
- id — BIGINT — Primary key — NOT NULL
- code — VARCHAR(50) — NOT NULL
- name — VARCHAR(200) — NOT NULL
project_members
- project_id — BIGINT — Foreign key → projects.id — NOT NULL
- researcher_id — BIGINT — Foreign key → researchers.id — NOT NULL
- role — VARCHAR(20) — NOT NULL
projects
- id — BIGINT — Primary key — NOT NULL
- client_id — BIGINT — Foreign key → clients.id — NOT NULL
- serial_number — VARCHAR(30) — NOT NULL
- name — VARCHAR(200) — NOT NULL
- status — VARCHAR(30) — NOT NULL
- locked_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ — NOT NULL
research_note_materials
- research_note_id — BIGINT — Foreign key → research_notes.id — NOT NULL
- material_id — BIGINT — Foreign key → materials.id — NOT NULL
- percentage — NUMERIC(8, 4) — NOT NULL
research_notes
- id — BIGINT — Primary key — NOT NULL
- project_id — BIGINT — Foreign key → projects.id — NOT NULL
- recorded_by_id — BIGINT — Foreign key → researchers.id — NOT NULL
- status — VARCHAR(30) — NOT NULL
- change_reason — TEXT
- next_plan — TEXT
- viscosity — NUMERIC(12, 2)
- ph — NUMERIC(4, 2)
- appearance — TEXT
- scent — TEXT
- result_note — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
researchers
- id — BIGINT — Primary key — NOT NULL
- department_id — BIGINT — Foreign key → departments.id — NOT NULL
- name — VARCHAR(50) — NOT NULL