Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int8 | 19 | √ | null |
|
|
||||||||||||||
| code | text | 2147483647 | null |
|
|
|||||||||||||||
| name | text | 2147483647 | null |
|
|
|||||||||||||||
| enabled | bool | 1 | true |
|
|
|||||||||||||||
| require_property | bool | 1 | true |
|
|
|||||||||||||||
| anchor_prop_id | int4 | 10 | √ | null |
|
|
||||||||||||||
| access_from | text | 2147483647 | √ | null |
|
|
ถ้าตั้งค่า: ใช้สิทธิ์ user_app_access/property_app ของ app code นี้แทน (inherit ไม่ต้อง seed ซ้ำ); NULL = ใช้ของตัวเอง |
|||||||||||||
| access_ttl_sec | int4 | 10 | 900 |
|
|
|||||||||||||||
| refresh_ttl_sec | int4 | 10 | 604800 |
|
|
|||||||||||||||
| single_session | bool | 1 | true |
|
|
|||||||||||||||
| login_payload_provider | text | 2147483647 | √ | null |
|
|
Qualified function signature (jsonb) -> json used to build ordered V2 app_data. |
|||||||||||||
| admin_perm | text | 2147483647 | √ | null |
|
|
Permission prefix gating this product’s properties through the admin RPCs; |
|||||||||||||
| return_user_permissions | bool | 1 | false |
|
|
When true, Authen V2 session payloads include top-level effective permission codes for the current app and property. |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| apps_pkey | Primary key | Asc | id |
| apps_code_key | Must be unique | Asc | code |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| chk_apps_access_ttl_sec | ((access_ttl_sec >= 60) AND (access_ttl_sec <= 86400)) |
| chk_apps_code_lower | (code = lower(code)) |
| chk_apps_refresh_ttl_sec | ((refresh_ttl_sec >= 300) AND (refresh_ttl_sec <= 31536000)) |

