Bỏ qua, đến nội dung

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.

FieldTypeMô tả
keystring (PK)Unique key: main, ext-pg, rest-orders...
displayNamestringTên hiển thị trên UI
typestringLoại connector: postgres, mysql, mssql, oracle, mariadb, rest-api
optionsjsonCấu hình kết nối (host, port, database, username, password...)
enabledbooleantrue = data source đang hoạt động
fixedbooleantrue = 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.

FieldTypeMô tả
idinteger (PK)Auto-increment
dataSourceKeystring (FK)Data source sở hữu
namestringTên collection (= tên bảng trong DB ngoài)
titlestringTên hiển thị override
optionsjsonTuỳ chọn override (sortable, filterable...)

dataSourcesFields

Metadata overlay cho field.

FieldTypeMô tả
idinteger (PK)Auto-increment
dataSourceKeystringData source sở hữu
collectionNamestringCollection sở hữu
namestringTên field (= tên column trong DB ngoài)
typestringField type
interfacestringUI interface override
optionsjsonTuỳ chọn override

dataSourcesRoles

Strategy role cho mỗi data source.

FieldTypeMô tả
idinteger (PK)Auto-increment
dataSourceKeystring (FK)Data source
roleNamestringTên role
strategyjsonDefault 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".

FieldTypeMô tả
idinteger (PK)Auto-increment
dataSourceKeystringData source
roleNamestringTên role
namestringTên collection/resource
usingActionsConfigbooleantrue = dùng action config riêng thay vì strategy

dataSourcesRolesResourcesActions

Action permissions cho mỗi resource.

FieldTypeMô tả
idinteger (PK)Auto-increment
resourceIdinteger (FK)dataSourcesRolesResources.id
namestringAction name: view, create, update, destroy, export
fieldsjsonFields whitelist (null = tất cả)
scopeIdinteger (FK)dataSourcesRolesResourcesScopes.id

dataSourcesRolesResourcesScopes

Named scope cho data source — tương tự scope trong plugin-acl.

FieldTypeMô tả
idinteger (PK)Auto-increment
dataSourceKeystringData source
keystringUnique key
namestringTên hiển thị
resourceNamestringCollection áp dụng
scopejsonJSON filter, VD: { "status": "active" }