Giao diện
Database schema
ER Diagram
Chi tiết bảng
dataSources
Bảng chính lưu cấu hình kết nối data source.
| Field | Type | Mô tả |
|---|---|---|
key | string (PK) | Unique key: main, ext-pg, rest-orders... |
displayName | string | Tên hiển thị trên UI |
type | string | Loại connector: postgres, mysql, mssql, oracle, mariadb, rest-api |
options | json | Cấu hình kết nối (host, port, database, username, password...) |
enabled | boolean | true = data source đang hoạt động |
fixed | boolean | true = không thể xóa (data source main) |
WARNING
options chứa thông tin nhạy cảm (password). API dataSources:list mask password trong response.
dataSourcesCollections
Metadata overlay cho collection từ data source ngoài.
| Field | Type | Mô tả |
|---|---|---|
id | integer (PK) | Auto-increment |
dataSourceKey | string (FK) | Data source sở hữu |
name | string | Tên collection (= tên bảng trong DB ngoài) |
title | string | Tên hiển thị override |
options | json | Tuỳ chọn override (sortable, filterable...) |
dataSourcesFields
Metadata overlay cho field.
| Field | Type | Mô tả |
|---|---|---|
id | integer (PK) | Auto-increment |
dataSourceKey | string | Data source sở hữu |
collectionName | string | Collection sở hữu |
name | string | Tên field (= tên column trong DB ngoài) |
type | string | Field type |
interface | string | UI interface override |
options | json | Tuỳ chọn override |
dataSourcesRoles
Strategy role cho mỗi data source.
| Field | Type | Mô tả |
|---|---|---|
id | integer (PK) | Auto-increment |
dataSourceKey | string (FK) | Data source |
roleName | string | Tên role |
strategy | json | Default strategy: { "actions": ["view", "create"] } |
dataSourcesRolesResources
Permission resource — mỗi record đại diện "role X có cấu hình riêng cho collection Y trên data source Z".
| Field | Type | Mô tả |
|---|---|---|
id | integer (PK) | Auto-increment |
dataSourceKey | string | Data source |
roleName | string | Tên role |
name | string | Tên collection/resource |
usingActionsConfig | boolean | true = dùng action config riêng thay vì strategy |
dataSourcesRolesResourcesActions
Action permissions cho mỗi resource.
| Field | Type | Mô tả |
|---|---|---|
id | integer (PK) | Auto-increment |
resourceId | integer (FK) | dataSourcesRolesResources.id |
name | string | Action name: view, create, update, destroy, export |
fields | json | Fields whitelist (null = tất cả) |
scopeId | integer (FK) | dataSourcesRolesResourcesScopes.id |
dataSourcesRolesResourcesScopes
Named scope cho data source — tương tự scope trong plugin-acl.
| Field | Type | Mô tả |
|---|---|---|
id | integer (PK) | Auto-increment |
dataSourceKey | string | Data source |
key | string | Unique key |
name | string | Tên hiển thị |
resourceName | string | Collection áp dụng |
scope | json | JSON filter, VD: { "status": "active" } |