Giao diện
Database schema
ER Diagram
Chi tiết bảng
collections
Bảng metadata lưu định nghĩa collection. Mỗi record tương ứng một bảng vật lý (hoặc view) trong database.
| Field | Type | Mô tả |
|---|---|---|
key | uid | UID duy nhất |
name | string (unique) | Tên collection — bảng vật lý sẽ là t_<name> |
title | string | Tên hiển thị trên UI |
inherit | string | Tên collection cha (PostgreSQL table inheritance) |
hidden | boolean | true = ẩn khỏi Collection Manager UI |
options | json | Tuỳ chọn: view (boolean), schema (DB schema), autoGenId, sortable... |
description | string | Mô tả |
Associations:
hasMany fields— danh sách field.belongsToMany collectionCategories— danh mục phân loại (qua junctioncollectionCategory).
fields
Bảng metadata lưu định nghĩa field. Mỗi record tương ứng một column trong bảng vật lý (hoặc relation).
| Field | Type | Mô tả |
|---|---|---|
key | uid | UID duy nhất |
name | string | Tên field — tên column vật lý |
collectionName | string (FK) | Collection sở hữu |
type | string | Field type: string, integer, belongsTo, hasMany... |
interface | string | UI interface: input, number, select, obo... |
description | string | Mô tả field |
parentKey | string (FK) | fields.key — cho sub-fields (VD: JSON sub-fields) |
reverseKey | string (FK) | fields.key — reverse relation field |
options | json | Tuỳ chọn: target, foreignKey, through, unique, defaultValue... |
sort | integer | Thứ tự hiển thị trên UI |
Associations:
belongsTo collection— collection sở hữu.hasMany children— sub-fields (quaparentKey).hasOne reverseField— reverse relation (quareverseKey).
Options JSON — ví dụ
belongsTo field:
json
{
"target": "users",
"foreignKey": "customerId",
"targetKey": "id",
"onDelete": "SET NULL"
}belongsToMany field:
json
{
"target": "tags",
"through": "ordersTags",
"foreignKey": "orderId",
"otherKey": "tagId"
}collectionCategories
Danh mục phân loại collection.
| Field | Type | Mô tả |
|---|---|---|
id | bigInt (PK) | Snowflake ID |
name | string | Tên danh mục (VD: "Business", "System") |
color | string | Màu hiển thị trên UI |
M2M với collections qua bảng junction collectionCategory.