apps

9 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int8 19 √ null
app_client.app_id fk_app_client_app C
login_challenge.app_id fk_login_challenge_app C
user_session.app_id fk_user_session_app C
code text 2147483647 null
apps.access_from fk_apps_access_from N
property_app.app_code fk_property_app_app_code R
user_app_access.app_code fk_user_app_access_app_code R
configs.app_code fk_sys_configs_app_code R
name text 2147483647 null
enabled bool 1 true
require_property bool 1 true
anchor_prop_id int4 10 √ null
property.id fk_apps_anchor_prop_id N
access_from text 2147483647 √ null
apps.code fk_apps_access_from N

ถ้าตั้งค่า: ใช้สิทธิ์ 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; .property.save / .property.view. NULL = not manageable through them.

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))

Relationships