Design Table
Overview
Table for managing design information
Table Definition
| Logical Name | Physical Name | Column Name | Data Type | Primary Key | Relation | Unique | Nullable | Default Value | Remarks |
|---|---|---|---|---|---|---|---|---|---|
| Design | design | id | string | โฏ | varchar(255) | ||||
| project_id | number | project:id | |||||||
| name | string | ||||||||
| type | enum | content_type ('0' page, '1' component) |
|||||||
| based_on | enum | based_on ('0', '1', '2') |
|||||||
| image_url | string | ||||||||
| json_schema_url | string | ||||||||
| status | enum | '0' | design_status (default '0' = processing) |
||||||
| created_at | datetime | ||||||||
| updated_at | datetime | ||||||||
| deleted_at | datetime | โฏ | |||||||
| created_by | string | user:cognito_sub | |||||||
| updated_by | string | user:cognito_sub | |||||||
| deleted_by | string | user:cognito_sub | โฏ |
Relations
project_idโproject.id- Audit fields reference
user.cognito_subas in other project-scoped tables
Indexes
- PRIMARY KEY (id)
- INDEX
design_project_id_deleted_at_idx(project_id, deleted_at) - INDEX
design_project_created_idx(project_id, created_at)
Notes
type,based_on, andstatusare PostgreSQL enums (string-like values in application code as defined indesign.ts)