ㅂ
Tables (10)
approval_histories
- id — BIGSERIAL — Primary key — NOT NULL
- approval_request_id — BIGINT — Foreign key → approval_requests.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- action — VARCHAR(50) — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
approval_history_details
- id — BIGSERIAL — Primary key — NOT NULL
- approval_history_id — BIGINT — Foreign key → approval_histories.id — NOT NULL
- field_name — VARCHAR(100) — NOT NULL
- old_value — TEXT
- new_value — TEXT
approval_images
- id — BIGSERIAL — Primary key — NOT NULL
- approval_request_id — BIGINT — Foreign key → approval_requests.id — NOT NULL
- s3_key — VARCHAR(512) — NOT NULL
- file_name — VARCHAR(255) — NOT NULL
- file_size — BIGINT — NOT NULL
- sort_order — INT — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
approval_requests
- id — BIGSERIAL — Primary key — NOT NULL
- title — VARCHAR(255) — NOT NULL
- description — TEXT
- status — VARCHAR(50) — NOT NULL
- creator_id — BIGINT — Foreign key → users.id — NOT NULL
- brand_id — BIGINT — Foreign key → brands.id — NOT NULL
- version — INT — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
- updated_at — TIMESTAMP WITH TIME ZONE
brands
- id — BIGSERIAL — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
- updated_at — TIMESTAMP WITH TIME ZONE
comment_attachments
- id — BIGSERIAL — Primary key — NOT NULL
- comment_id — BIGINT — Foreign key → comments.id — NOT NULL
- s3_key — VARCHAR(512) — NOT NULL
- file_name — VARCHAR(255) — NOT NULL
- file_size — BIGINT — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
comments
- id — BIGSERIAL — Primary key — NOT NULL
- approval_request_id — BIGINT — Foreign key → approval_requests.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- parent_id — BIGINT — Foreign key → comments.id
- content — TEXT — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
- updated_at — TIMESTAMP WITH TIME ZONE
- deleted_at — TIMESTAMP WITH TIME ZONE
roles
- id — BIGSERIAL — Primary key — NOT NULL
- role_name — VARCHAR(50) — NOT NULL
- description — TEXT
user_role_mapping
- id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- brand_id — BIGINT — Foreign key → brands.id — NOT NULL
- role_id — BIGINT — Foreign key → roles.id — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
users
- id — BIGSERIAL — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- is_internal — BOOLEAN — NOT NULL
- created_at — TIMESTAMP WITH TIME ZONE
- updated_at — TIMESTAMP WITH TIME ZONE