From cf39ea2b0c5fe65faf0e99e4e8b685b89cacc02b Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 4 Apr 2026 16:59:38 +0800 Subject: [PATCH] chore(directus): switch ids to uuid and add key fields only --- docs/directus/member-schema.directus.json | 5389 ++++++++++----------- 1 file changed, 2645 insertions(+), 2744 deletions(-) diff --git a/docs/directus/member-schema.directus.json b/docs/directus/member-schema.directus.json index ec1f229..4a87544 100644 --- a/docs/directus/member-schema.directus.json +++ b/docs/directus/member-schema.directus.json @@ -1,10 +1,10 @@ { "collections": [ { - "collection": "users", + "collection": "center", "meta": { - "collection": "users", - "icon": null, + "collection": "center", + "icon": "folder", "note": null, "display_template": null, "hidden": false, @@ -18,13 +18,13 @@ "accountability": "all", "color": null, "item_duplication_fields": null, - "sort": null, + "sort": 1, "group": null, "collapse": "open", "preview_url": null, "versioning": false }, - "schema": {} + "schema": null }, { "collection": "companies", @@ -36,68 +36,16 @@ "hidden": false, "singleton": false, "translations": null, - "archive_field": null, + "archive_field": "status", "archive_app_filter": true, - "archive_value": null, - "unarchive_value": null, + "archive_value": "archived", + "unarchive_value": "draft", "sort_field": null, "accountability": "all", "color": null, "item_duplication_fields": null, - "sort": null, - "group": null, - "collapse": "open", - "preview_url": null, - "versioning": false - }, - "schema": {} - }, - { - "collection": "sites", - "meta": { - "collection": "sites", - "icon": null, - "note": null, - "display_template": null, - "hidden": false, - "singleton": false, - "translations": null, - "archive_field": null, - "archive_app_filter": true, - "archive_value": null, - "unarchive_value": null, - "sort_field": null, - "accountability": "all", - "color": null, - "item_duplication_fields": null, - "sort": null, - "group": null, - "collapse": "open", - "preview_url": null, - "versioning": false - }, - "schema": {} - }, - { - "collection": "systems", - "meta": { - "collection": "systems", - "icon": null, - "note": null, - "display_template": null, - "hidden": false, - "singleton": false, - "translations": null, - "archive_field": null, - "archive_app_filter": true, - "archive_value": null, - "unarchive_value": null, - "sort_field": null, - "accountability": "all", - "color": null, - "item_duplication_fields": null, - "sort": null, - "group": null, + "sort": 1, + "group": "center", "collapse": "open", "preview_url": null, "versioning": false @@ -122,8 +70,8 @@ "accountability": "all", "color": null, "item_duplication_fields": null, - "sort": null, - "group": null, + "sort": 1, + "group": "systems", "collapse": "open", "preview_url": null, "versioning": false @@ -131,9 +79,61 @@ "schema": {} }, { - "collection": "site_roles", + "collection": "roles_sites", "meta": { - "collection": "site_roles", + "collection": "roles_sites", + "icon": "import_export", + "note": null, + "display_template": null, + "hidden": true, + "singleton": false, + "translations": null, + "archive_field": null, + "archive_app_filter": true, + "archive_value": null, + "unarchive_value": null, + "sort_field": null, + "accountability": "all", + "color": null, + "item_duplication_fields": null, + "sort": 1, + "group": "roles", + "collapse": "open", + "preview_url": null, + "versioning": false + }, + "schema": {} + }, + { + "collection": "sites", + "meta": { + "collection": "sites", + "icon": null, + "note": null, + "display_template": null, + "hidden": false, + "singleton": false, + "translations": null, + "archive_field": null, + "archive_app_filter": true, + "archive_value": "archived", + "unarchive_value": "draft", + "sort_field": null, + "accountability": "all", + "color": null, + "item_duplication_fields": null, + "sort": 1, + "group": "companies", + "collapse": "open", + "preview_url": null, + "versioning": false + }, + "schema": {} + }, + { + "collection": "users", + "meta": { + "collection": "users", "icon": null, "note": null, "display_template": null, @@ -148,8 +148,8 @@ "accountability": "all", "color": null, "item_duplication_fields": null, - "sort": null, - "group": null, + "sort": 1, + "group": "sites", "collapse": "open", "preview_url": null, "versioning": false @@ -157,9 +157,35 @@ "schema": {} }, { - "collection": "user_sites", + "collection": "users_sites", "meta": { - "collection": "user_sites", + "collection": "users_sites", + "icon": "import_export", + "note": null, + "display_template": null, + "hidden": true, + "singleton": false, + "translations": null, + "archive_field": null, + "archive_app_filter": true, + "archive_value": null, + "unarchive_value": null, + "sort_field": null, + "accountability": "all", + "color": null, + "item_duplication_fields": null, + "sort": 1, + "group": "users", + "collapse": "open", + "preview_url": null, + "versioning": false + }, + "schema": {} + }, + { + "collection": "systems", + "meta": { + "collection": "systems", "icon": null, "note": null, "display_template": null, @@ -174,60 +200,8 @@ "accountability": "all", "color": null, "item_duplication_fields": null, - "sort": null, - "group": null, - "collapse": "open", - "preview_url": null, - "versioning": false - }, - "schema": {} - }, - { - "collection": "auth_sync_state", - "meta": { - "collection": "auth_sync_state", - "icon": null, - "note": null, - "display_template": null, - "hidden": false, - "singleton": false, - "translations": null, - "archive_field": null, - "archive_app_filter": true, - "archive_value": null, - "unarchive_value": null, - "sort_field": null, - "accountability": "all", - "color": null, - "item_duplication_fields": null, - "sort": null, - "group": null, - "collapse": "open", - "preview_url": null, - "versioning": false - }, - "schema": {} - }, - { - "collection": "api_clients", - "meta": { - "collection": "api_clients", - "icon": null, - "note": null, - "display_template": null, - "hidden": false, - "singleton": false, - "translations": null, - "archive_field": null, - "archive_app_filter": true, - "archive_value": null, - "unarchive_value": null, - "sort_field": null, - "accountability": "all", - "color": null, - "item_duplication_fields": null, - "sort": null, - "group": null, + "sort": 2, + "group": "center", "collapse": "open", "preview_url": null, "versioning": false @@ -236,470 +210,6 @@ } ], "fields": [ - { - "collection": "users", - "field": "id", - "type": "uuid", - "schema": { - "name": "id", - "table": "users", - "data_type": "uuid", - "default_value": "gen_random_uuid()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": true, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": true, - "hidden": true, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "user_sub", - "type": "string", - "schema": { - "name": "user_sub", - "table": "users", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "user_sub", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "provider_user_id", - "type": "string", - "schema": { - "name": "provider_user_id", - "table": "users", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": true, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "provider_user_id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "username", - "type": "string", - "schema": { - "name": "username", - "table": "users", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": true, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "username", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "email", - "type": "string", - "schema": { - "name": "email", - "table": "users", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": true, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "email", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "display_name", - "type": "string", - "schema": { - "name": "display_name", - "table": "users", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "display_name", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "status", - "type": "string", - "schema": { - "name": "status", - "table": "users", - "data_type": "character varying", - "default_value": "active", - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "status", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "is_active", - "type": "boolean", - "schema": { - "name": "is_active", - "table": "users", - "data_type": "boolean", - "default_value": true, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "is_active", - "special": null, - "interface": "boolean", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "created_at", - "type": "timestamp", - "schema": { - "name": "created_at", - "table": "users", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "created_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "users", - "field": "updated_at", - "type": "timestamp", - "schema": { - "name": "updated_at", - "table": "users", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "users", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, { "collection": "companies", "field": "id", @@ -734,13 +244,13 @@ "display_options": null, "readonly": true, "hidden": true, - "sort": null, + "sort": 1, "width": "full", "translations": null, "note": null, "conditions": null, "required": false, - "group": null, + "group": "system_info", "validation": null, "validation_message": null, "searchable": true @@ -780,8 +290,81 @@ "display_options": null, "readonly": false, "hidden": false, - "sort": null, - "width": "full", + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": true, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "companies", + "field": "status", + "type": "string", + "schema": { + "name": "status", + "table": "companies", + "data_type": "character varying", + "default_value": "ACTIVE", + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "companies", + "field": "status", + "special": null, + "interface": "select-dropdown", + "options": { + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "display": "labels", + "display_options": { + "showAsDot": true, + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "readonly": false, + "hidden": false, + "sort": 1, + "width": "half", "translations": null, "note": null, "conditions": null, @@ -792,6 +375,56 @@ "searchable": true } }, + { + "collection": "companies", + "field": "date_created", + "type": "timestamp", + "schema": { + "name": "date_created", + "table": "companies", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "companies", + "field": "date_created", + "special": [ + "date-created" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, { "collection": "companies", "field": "name", @@ -826,8 +459,8 @@ "display_options": null, "readonly": false, "hidden": false, - "sort": null, - "width": "full", + "sort": 2, + "width": "half", "translations": null, "note": null, "conditions": null, @@ -840,15 +473,15 @@ }, { "collection": "companies", - "field": "provider_group_id", - "type": "string", + "field": "user_created", + "type": "uuid", "schema": { - "name": "provider_group_id", + "name": "user_created", "table": "companies", - "data_type": "character varying", + "data_type": "uuid", "default_value": null, "generation_expression": null, - "max_length": 255, + "max_length": null, "numeric_precision": null, "numeric_scale": null, "is_generated": false, @@ -857,674 +490,63 @@ "is_indexed": false, "is_primary_key": false, "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "companies", - "field": "provider_group_id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "companies", - "field": "status", - "type": "string", - "schema": { - "name": "status", - "table": "companies", - "data_type": "character varying", - "default_value": "active", - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "companies", - "field": "status", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "companies", - "field": "created_at", - "type": "timestamp", - "schema": { - "name": "created_at", - "table": "companies", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "companies", - "field": "created_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "companies", - "field": "updated_at", - "type": "timestamp", - "schema": { - "name": "updated_at", - "table": "companies", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "companies", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "id", - "type": "uuid", - "schema": { - "name": "id", - "table": "sites", - "data_type": "uuid", - "default_value": "gen_random_uuid()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": true, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": true, - "hidden": true, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "site_key", - "type": "string", - "schema": { - "name": "site_key", - "table": "sites", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "site_key", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "company_id", - "type": "uuid", - "schema": { - "name": "company_id", - "table": "sites", - "data_type": "uuid", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, "foreign_key_schema": "public", - "foreign_key_table": "companies", + "foreign_key_table": "directus_users", "foreign_key_column": "id", "comment": null }, "meta": { - "collection": "sites", - "field": "company_id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "display_name", - "type": "string", - "schema": { - "name": "display_name", - "table": "sites", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "display_name", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "domain", - "type": "string", - "schema": { - "name": "domain", - "table": "sites", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "domain", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "provider_group_id", - "type": "string", - "schema": { - "name": "provider_group_id", - "table": "sites", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "provider_group_id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "status", - "type": "string", - "schema": { - "name": "status", - "table": "sites", - "data_type": "character varying", - "default_value": "active", - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "status", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "created_at", - "type": "timestamp", - "schema": { - "name": "created_at", - "table": "sites", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "created_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true + "collection": "companies", + "field": "user_created", + "special": [ + "user-created" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "sites", - "field": "updated_at", - "type": "timestamp", - "schema": { - "name": "updated_at", - "table": "sites", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "sites", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "systems", - "field": "id", - "type": "uuid", - "schema": { - "name": "id", - "table": "systems", - "data_type": "uuid", - "default_value": "gen_random_uuid()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": true, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "systems", - "field": "id", - "special": null, - "interface": "input", - "options": null, - "display": null, + "display": "user", "display_options": null, "readonly": true, "hidden": true, - "sort": null, - "width": "full", + "sort": 3, + "width": "half", "translations": null, "note": null, "conditions": null, "required": false, - "group": null, + "group": "system_info", "validation": null, "validation_message": null, "searchable": true } }, { - "collection": "systems", - "field": "system_key", - "type": "string", - "schema": { - "name": "system_key", - "table": "systems", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, + "collection": "companies", + "field": "sites", + "type": "alias", + "schema": null, "meta": { - "collection": "systems", - "field": "system_key", - "special": null, - "interface": "input", - "options": null, - "display": null, + "collection": "companies", + "field": "sites", + "special": [ + "o2m" + ], + "interface": "list-o2m", + "options": { + "layout": "table", + "fields": [ + "name", + "status", + "users", + "roles" + ] + }, + "display": "related-values", "display_options": null, "readonly": false, "hidden": false, - "sort": null, + "sort": 3, "width": "full", "translations": null, "note": null, @@ -1537,112 +559,20 @@ } }, { - "collection": "systems", - "field": "name", - "type": "string", - "schema": { - "name": "name", - "table": "systems", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "systems", - "field": "name", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "systems", - "field": "status", - "type": "string", - "schema": { - "name": "status", - "table": "systems", - "data_type": "character varying", - "default_value": "active", - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "systems", - "field": "status", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "systems", - "field": "created_at", + "collection": "companies", + "field": "date_updated", "type": "timestamp", "schema": { - "name": "created_at", - "table": "systems", + "name": "date_updated", + "table": "companies", "data_type": "timestamp with time zone", - "default_value": "now()", + "default_value": null, "generation_expression": null, "max_length": null, "numeric_precision": null, "numeric_scale": null, "is_generated": false, - "is_nullable": false, + "is_nullable": true, "is_unique": false, "is_indexed": false, "is_primary_key": false, @@ -1653,9 +583,11 @@ "comment": null }, "meta": { - "collection": "systems", - "field": "created_at", - "special": null, + "collection": "companies", + "field": "date_updated", + "special": [ + "date-updated" + ], "interface": "datetime", "options": null, "display": "datetime", @@ -1663,8 +595,39 @@ "relative": true }, "readonly": true, + "hidden": true, + "sort": 4, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "companies", + "field": "system_info", + "type": "alias", + "schema": null, + "meta": { + "collection": "companies", + "field": "system_info", + "special": [ + "alias", + "no-data", + "group" + ], + "interface": "group-raw", + "options": null, + "display": null, + "display_options": null, + "readonly": false, "hidden": false, - "sort": null, + "sort": 4, "width": "full", "translations": null, "note": null, @@ -1677,48 +640,50 @@ } }, { - "collection": "systems", - "field": "updated_at", - "type": "timestamp", + "collection": "companies", + "field": "user_updated", + "type": "uuid", "schema": { - "name": "updated_at", - "table": "systems", - "data_type": "timestamp with time zone", - "default_value": "now()", + "name": "user_updated", + "table": "companies", + "data_type": "uuid", + "default_value": null, "generation_expression": null, "max_length": null, "numeric_precision": null, "numeric_scale": null, "is_generated": false, - "is_nullable": false, + "is_nullable": true, "is_unique": false, "is_indexed": false, "is_primary_key": false, "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", "comment": null }, "meta": { - "collection": "systems", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true + "collection": "companies", + "field": "user_updated", + "special": [ + "user-updated" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" }, + "display": "user", + "display_options": null, "readonly": true, - "hidden": false, - "sort": null, - "width": "full", + "hidden": true, + "sort": 5, + "width": "half", "translations": null, "note": null, "conditions": null, "required": false, - "group": null, + "group": "system_info", "validation": null, "validation_message": null, "searchable": true @@ -1758,18 +723,119 @@ "display_options": null, "readonly": true, "hidden": true, - "sort": null, + "sort": 1, "width": "full", "translations": null, "note": null, "conditions": null, "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "roles", + "field": "system_id", + "type": "uuid", + "schema": { + "name": "system_id", + "table": "roles", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "systems", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "roles", + "field": "system_id", + "special": [ + "m2o" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{name}}", + "enableCreate": false + }, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 1, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, "group": null, "validation": null, "validation_message": null, "searchable": true } }, + { + "collection": "roles", + "field": "date_created", + "type": "timestamp", + "schema": { + "name": "date_created", + "table": "roles", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "roles", + "field": "date_created", + "special": [ + "date-created" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, { "collection": "roles", "field": "role_key", @@ -1804,12 +870,12 @@ "display_options": null, "readonly": false, "hidden": false, - "sort": null, - "width": "full", + "sort": 2, + "width": "half", "translations": null, "note": null, "conditions": null, - "required": false, + "required": true, "group": null, "validation": null, "validation_message": null, @@ -1818,56 +884,10 @@ }, { "collection": "roles", - "field": "role_code", - "type": "string", - "schema": { - "name": "role_code", - "table": "roles", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "roles", - "field": "role_code", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "roles", - "field": "system_id", + "field": "user_created", "type": "uuid", "schema": { - "name": "system_id", + "name": "user_created", "table": "roles", "data_type": "uuid", "default_value": null, @@ -1876,125 +896,37 @@ "numeric_precision": null, "numeric_scale": null, "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": "public", - "foreign_key_table": "systems", - "foreign_key_column": "id", - "comment": null - }, - "meta": { - "collection": "roles", - "field": "system_id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "roles", - "field": "name", - "type": "string", - "schema": { - "name": "name", - "table": "roles", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "roles", - "field": "name", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "roles", - "field": "description", - "type": "text", - "schema": { - "name": "description", - "table": "roles", - "data_type": "text", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, "is_nullable": true, "is_unique": false, "is_indexed": false, "is_primary_key": false, "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", "comment": null }, "meta": { "collection": "roles", - "field": "description", - "special": null, - "interface": "input-multiline", - "options": null, - "display": null, + "field": "user_created", + "special": [ + "user-created" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", + "readonly": true, + "hidden": true, + "sort": 3, + "width": "half", "translations": null, "note": null, "conditions": null, "required": false, - "group": null, + "group": "system_info", "validation": null, "validation_message": null, "searchable": true @@ -2008,7 +940,7 @@ "name": "status", "table": "roles", "data_type": "character varying", - "default_value": "active", + "default_value": "ACTIVE", "generation_expression": null, "max_length": 255, "numeric_precision": null, @@ -2028,13 +960,222 @@ "collection": "roles", "field": "status", "special": null, + "interface": "select-dropdown", + "options": { + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "display": "labels", + "display_options": { + "showAsDot": true, + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "readonly": false, + "hidden": false, + "sort": 3, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "roles", + "field": "date_updated", + "type": "timestamp", + "schema": { + "name": "date_updated", + "table": "roles", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "roles", + "field": "date_updated", + "special": [ + "date-updated" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 4, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "roles", + "field": "name", + "type": "string", + "schema": { + "name": "name", + "table": "roles", + "data_type": "character varying", + "default_value": null, + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "roles", + "field": "name", + "special": null, "interface": "input", "options": null, "display": null, "display_options": null, "readonly": false, "hidden": false, - "sort": null, + "sort": 4, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "roles", + "field": "user_updated", + "type": "uuid", + "schema": { + "name": "user_updated", + "table": "roles", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "roles", + "field": "user_updated", + "special": [ + "user-updated" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 5, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "roles", + "field": "sites", + "type": "alias", + "schema": null, + "meta": { + "collection": "roles", + "field": "sites", + "special": [ + "m2m" + ], + "interface": "list-m2m", + "options": { + "layout": "table", + "fields": [ + "sites_id.company_id", + "sites_id.name", + "sites_id.users" + ] + }, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 5, "width": "full", "translations": null, "note": null, @@ -2048,41 +1189,24 @@ }, { "collection": "roles", - "field": "created_at", - "type": "timestamp", - "schema": { - "name": "created_at", - "table": "roles", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, + "field": "system_info", + "type": "alias", + "schema": null, "meta": { "collection": "roles", - "field": "created_at", - "special": null, - "interface": "datetime", + "field": "system_info", + "special": [ + "alias", + "no-data", + "group" + ], + "interface": "group-raw", "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, + "display": null, + "display_options": null, + "readonly": false, "hidden": false, - "sort": null, + "sort": 6, "width": "full", "translations": null, "note": null, @@ -2095,60 +1219,12 @@ } }, { - "collection": "roles", - "field": "updated_at", - "type": "timestamp", - "schema": { - "name": "updated_at", - "table": "roles", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "roles", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "site_roles", + "collection": "roles_sites", "field": "id", "type": "uuid", "schema": { "name": "id", - "table": "site_roles", + "table": "roles_sites", "data_type": "uuid", "default_value": "gen_random_uuid()", "generation_expression": null, @@ -2167,62 +1243,16 @@ "comment": null }, "meta": { - "collection": "site_roles", + "collection": "roles_sites", "field": "id", "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": true, - "hidden": true, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "site_roles", - "field": "site_id", - "type": "uuid", - "schema": { - "name": "site_id", - "table": "site_roles", - "data_type": "uuid", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": "public", - "foreign_key_table": "sites", - "foreign_key_column": "id", - "comment": null - }, - "meta": { - "collection": "site_roles", - "field": "site_id", - "special": null, - "interface": "input", + "interface": null, "options": null, "display": null, "display_options": null, "readonly": false, - "hidden": false, - "sort": null, + "hidden": true, + "sort": 1, "width": "full", "translations": null, "note": null, @@ -2235,12 +1265,12 @@ } }, { - "collection": "site_roles", - "field": "role_id", + "collection": "roles_sites", + "field": "roles_id", "type": "uuid", "schema": { - "name": "role_id", - "table": "site_roles", + "name": "roles_id", + "table": "roles_sites", "data_type": "uuid", "default_value": null, "generation_expression": null, @@ -2248,7 +1278,7 @@ "numeric_precision": null, "numeric_scale": null, "is_generated": false, - "is_nullable": false, + "is_nullable": true, "is_unique": false, "is_indexed": false, "is_primary_key": false, @@ -2259,110 +1289,16 @@ "comment": null }, "meta": { - "collection": "site_roles", - "field": "role_id", + "collection": "roles_sites", + "field": "roles_id", "special": null, - "interface": "input", + "interface": null, "options": null, "display": null, "display_options": null, "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "site_roles", - "field": "created_at", - "type": "timestamp", - "schema": { - "name": "created_at", - "table": "site_roles", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "site_roles", - "field": "created_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "user_sites", - "field": "id", - "type": "uuid", - "schema": { - "name": "id", - "table": "user_sites", - "data_type": "uuid", - "default_value": "gen_random_uuid()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": true, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "user_sites", - "field": "id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": true, "hidden": true, - "sort": null, + "sort": 2, "width": "full", "translations": null, "note": null, @@ -2375,12 +1311,12 @@ } }, { - "collection": "user_sites", - "field": "user_id", + "collection": "roles_sites", + "field": "sites_id", "type": "uuid", "schema": { - "name": "user_id", - "table": "user_sites", + "name": "sites_id", + "table": "roles_sites", "data_type": "uuid", "default_value": null, "generation_expression": null, @@ -2388,53 +1324,7 @@ "numeric_precision": null, "numeric_scale": null, "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": "public", - "foreign_key_table": "users", - "foreign_key_column": "id", - "comment": null - }, - "meta": { - "collection": "user_sites", - "field": "user_id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "user_sites", - "field": "site_id", - "type": "uuid", - "schema": { - "name": "site_id", - "table": "user_sites", - "data_type": "uuid", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, + "is_nullable": true, "is_unique": false, "is_indexed": false, "is_primary_key": false, @@ -2445,16 +1335,16 @@ "comment": null }, "meta": { - "collection": "user_sites", - "field": "site_id", + "collection": "roles_sites", + "field": "sites_id", "special": null, - "interface": "input", + "interface": null, "options": null, "display": null, "display_options": null, "readonly": false, - "hidden": false, - "sort": null, + "hidden": true, + "sort": 3, "width": "full", "translations": null, "note": null, @@ -2467,108 +1357,12 @@ } }, { - "collection": "user_sites", - "field": "created_at", - "type": "timestamp", - "schema": { - "name": "created_at", - "table": "user_sites", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "user_sites", - "field": "created_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "user_sites", - "field": "updated_at", - "type": "timestamp", - "schema": { - "name": "updated_at", - "table": "user_sites", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "user_sites", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "auth_sync_state", + "collection": "sites", "field": "id", "type": "uuid", "schema": { "name": "id", - "table": "auth_sync_state", + "table": "sites", "data_type": "uuid", "default_value": "gen_random_uuid()", "generation_expression": null, @@ -2587,7 +1381,7 @@ "comment": null }, "meta": { - "collection": "auth_sync_state", + "collection": "sites", "field": "id", "special": null, "interface": "input", @@ -2596,351 +1390,25 @@ "display_options": null, "readonly": true, "hidden": true, - "sort": null, + "sort": 1, "width": "full", "translations": null, "note": null, "conditions": null, "required": false, - "group": null, + "group": "system_info", "validation": null, "validation_message": null, "searchable": true } }, { - "collection": "auth_sync_state", - "field": "entity_type", + "collection": "sites", + "field": "site_key", "type": "string", "schema": { - "name": "entity_type", - "table": "auth_sync_state", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "auth_sync_state", - "field": "entity_type", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "auth_sync_state", - "field": "entity_id", - "type": "uuid", - "schema": { - "name": "entity_id", - "table": "auth_sync_state", - "data_type": "uuid", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "auth_sync_state", - "field": "entity_id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "auth_sync_state", - "field": "last_synced_at", - "type": "timestamp", - "schema": { - "name": "last_synced_at", - "table": "auth_sync_state", - "data_type": "timestamp with time zone", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "auth_sync_state", - "field": "last_synced_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "auth_sync_state", - "field": "source_version", - "type": "string", - "schema": { - "name": "source_version", - "table": "auth_sync_state", - "data_type": "character varying", - "default_value": null, - "generation_expression": null, - "max_length": 255, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "auth_sync_state", - "field": "source_version", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "auth_sync_state", - "field": "last_error", - "type": "text", - "schema": { - "name": "last_error", - "table": "auth_sync_state", - "data_type": "text", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "auth_sync_state", - "field": "last_error", - "special": null, - "interface": "input-multiline", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "auth_sync_state", - "field": "updated_at", - "type": "timestamp", - "schema": { - "name": "updated_at", - "table": "auth_sync_state", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "auth_sync_state", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "id", - "type": "uuid", - "schema": { - "name": "id", - "table": "api_clients", - "data_type": "uuid", - "default_value": "gen_random_uuid()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": true, - "is_indexed": false, - "is_primary_key": true, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "id", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": true, - "hidden": true, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "client_key", - "type": "string", - "schema": { - "name": "client_key", - "table": "api_clients", + "name": "site_key", + "table": "sites", "data_type": "character varying", "default_value": null, "generation_expression": null, @@ -2959,8 +1427,8 @@ "comment": null }, "meta": { - "collection": "api_clients", - "field": "client_key", + "collection": "sites", + "field": "site_key", "special": null, "interface": "input", "options": null, @@ -2968,7 +1436,61 @@ "display_options": null, "readonly": false, "hidden": false, - "sort": null, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": true, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "company_id", + "type": "uuid", + "schema": { + "name": "company_id", + "table": "sites", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "companies", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "sites", + "field": "company_id", + "special": [ + "m2o" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{name}}", + "enableCreate": false, + "enableLink": true + }, + "display": "related-values", + "display_options": { + "template": "{{name}}" + }, + "readonly": false, + "hidden": false, + "sort": 1, "width": "full", "translations": null, "note": null, @@ -2981,12 +1503,255 @@ } }, { - "collection": "api_clients", + "collection": "sites", + "field": "users", + "type": "alias", + "schema": null, + "meta": { + "collection": "sites", + "field": "users", + "special": [ + "m2m" + ], + "interface": "list-m2m", + "options": { + "layout": "table", + "tableSpacing": "compact", + "fields": [ + "users_id.email", + "users_id.name" + ] + }, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 1, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "tabs-ty2pbk", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "date_created", + "type": "timestamp", + "schema": { + "name": "date_created", + "table": "sites", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "sites", + "field": "date_created", + "special": [ + "date-created" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "status", + "type": "string", + "schema": { + "name": "status", + "table": "sites", + "data_type": "character varying", + "default_value": "ACTIVE", + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "sites", + "field": "status", + "special": null, + "interface": "select-dropdown", + "options": { + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "display": "labels", + "display_options": { + "showAsDot": true, + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "readonly": false, + "hidden": false, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "roles", + "type": "alias", + "schema": null, + "meta": { + "collection": "sites", + "field": "roles", + "special": [ + "m2m" + ], + "interface": "list-m2m", + "options": { + "layout": "table", + "fields": [ + "roles_id.name" + ] + }, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 2, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "tabs-ty2pbk", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "user_created", + "type": "uuid", + "schema": { + "name": "user_created", + "table": "sites", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "sites", + "field": "user_created", + "special": [ + "user-created" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 3, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", "field": "name", "type": "string", "schema": { "name": "name", - "table": "api_clients", + "table": "sites", "data_type": "character varying", "default_value": null, "generation_expression": null, @@ -2994,7 +1759,7 @@ "numeric_precision": null, "numeric_scale": null, "is_generated": false, - "is_nullable": false, + "is_nullable": true, "is_unique": false, "is_indexed": false, "is_primary_key": false, @@ -3005,7 +1770,7 @@ "comment": null }, "meta": { - "collection": "api_clients", + "collection": "sites", "field": "name", "special": null, "interface": "input", @@ -3014,7 +1779,121 @@ "display_options": null, "readonly": false, "hidden": false, - "sort": null, + "sort": 3, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "system_info", + "type": "alias", + "schema": null, + "meta": { + "collection": "sites", + "field": "system_info", + "special": [ + "alias", + "no-data", + "group" + ], + "interface": "group-raw", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 3, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "tabs-ty2pbk", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "date_updated", + "type": "timestamp", + "schema": { + "name": "date_updated", + "table": "sites", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "sites", + "field": "date_updated", + "special": [ + "date-updated" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 4, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "sites", + "field": "tabs-ty2pbk", + "type": "alias", + "schema": null, + "meta": { + "collection": "sites", + "field": "tabs-ty2pbk", + "special": [ + "alias", + "no-data", + "group" + ], + "interface": "group-tabs", + "options": { + "fillWidth": true + }, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 4, "width": "full", "translations": null, "note": null, @@ -3027,23 +1906,73 @@ } }, { - "collection": "api_clients", - "field": "status", - "type": "string", + "collection": "sites", + "field": "user_updated", + "type": "uuid", "schema": { - "name": "status", - "table": "api_clients", - "data_type": "character varying", - "default_value": "active", + "name": "user_updated", + "table": "sites", + "data_type": "uuid", + "default_value": null, "generation_expression": null, - "max_length": 255, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "sites", + "field": "user_updated", + "special": [ + "user-updated" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 5, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "id", + "type": "uuid", + "schema": { + "name": "id", + "table": "users", + "data_type": "uuid", + "default_value": "gen_random_uuid()", + "generation_expression": null, + "max_length": null, "numeric_precision": null, "numeric_scale": null, "is_generated": false, "is_nullable": false, - "is_unique": false, + "is_unique": true, "is_indexed": false, - "is_primary_key": false, + "is_primary_key": true, "has_auto_increment": false, "foreign_key_schema": null, "foreign_key_table": null, @@ -3051,444 +1980,22 @@ "comment": null }, "meta": { - "collection": "api_clients", - "field": "status", + "collection": "users", + "field": "id", "special": null, "interface": "input", "options": null, "display": null, "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "api_key_hash", - "type": "text", - "schema": { - "name": "api_key_hash", - "table": "api_clients", - "data_type": "text", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "api_key_hash", - "special": null, - "interface": "input-multiline", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "allowed_origins", - "type": "json", - "schema": { - "name": "allowed_origins", - "table": "api_clients", - "data_type": "jsonb", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "allowed_origins", - "special": null, - "interface": "input-code", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "allowed_ips", - "type": "json", - "schema": { - "name": "allowed_ips", - "table": "api_clients", - "data_type": "jsonb", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "allowed_ips", - "special": null, - "interface": "input-code", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "allowed_paths", - "type": "json", - "schema": { - "name": "allowed_paths", - "table": "api_clients", - "data_type": "jsonb", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "allowed_paths", - "special": null, - "interface": "input-code", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "rate_limit_per_min", - "type": "integer", - "schema": { - "name": "rate_limit_per_min", - "table": "api_clients", - "data_type": "integer", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": 32, - "numeric_scale": 0, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "rate_limit_per_min", - "special": null, - "interface": "input", - "options": null, - "display": null, - "display_options": null, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "expires_at", - "type": "timestamp", - "schema": { - "name": "expires_at", - "table": "api_clients", - "data_type": "timestamp with time zone", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "expires_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": false, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "last_used_at", - "type": "timestamp", - "schema": { - "name": "last_used_at", - "table": "api_clients", - "data_type": "timestamp with time zone", - "default_value": null, - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": true, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "last_used_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, "readonly": true, - "hidden": false, - "sort": null, + "hidden": true, + "sort": 1, "width": "full", "translations": null, "note": null, "conditions": null, "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "created_at", - "type": "timestamp", - "schema": { - "name": "created_at", - "table": "api_clients", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "created_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, - "validation": null, - "validation_message": null, - "searchable": true - } - }, - { - "collection": "api_clients", - "field": "updated_at", - "type": "timestamp", - "schema": { - "name": "updated_at", - "table": "api_clients", - "data_type": "timestamp with time zone", - "default_value": "now()", - "generation_expression": null, - "max_length": null, - "numeric_precision": null, - "numeric_scale": null, - "is_generated": false, - "is_nullable": false, - "is_unique": false, - "is_indexed": false, - "is_primary_key": false, - "has_auto_increment": false, - "foreign_key_schema": null, - "foreign_key_table": null, - "foreign_key_column": null, - "comment": null - }, - "meta": { - "collection": "api_clients", - "field": "updated_at", - "special": null, - "interface": "datetime", - "options": null, - "display": "datetime", - "display_options": { - "relative": true - }, - "readonly": true, - "hidden": false, - "sort": null, - "width": "full", - "translations": null, - "note": null, - "conditions": null, - "required": false, - "group": null, + "group": "system_info", "validation": null, "validation_message": null, "searchable": true @@ -3539,27 +2046,1239 @@ "validation_message": null, "searchable": true } + }, + { + "collection": "users", + "field": "sub", + "type": "string", + "schema": { + "name": "sub", + "table": "users", + "data_type": "character varying", + "default_value": null, + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": true, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users", + "field": "sub", + "special": null, + "interface": "input", + "options": null, + "display": null, + "display_options": null, + "readonly": true, + "hidden": false, + "sort": 1, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "date_created", + "type": "timestamp", + "schema": { + "name": "date_created", + "table": "users", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users", + "field": "date_created", + "special": [ + "date-created" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "status", + "type": "string", + "schema": { + "name": "status", + "table": "users", + "data_type": "character varying", + "default_value": "ACTIVE", + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users", + "field": "status", + "special": null, + "interface": "select-dropdown", + "options": { + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "display": "labels", + "display_options": { + "showAsDot": true, + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "readonly": false, + "hidden": false, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "user_created", + "type": "uuid", + "schema": { + "name": "user_created", + "table": "users", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "users", + "field": "user_created", + "special": [ + "user-created" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 3, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "email", + "type": "string", + "schema": { + "name": "email", + "table": "users", + "data_type": "character varying", + "default_value": null, + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users", + "field": "email", + "special": null, + "interface": "input", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 3, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": true, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "date_updated", + "type": "timestamp", + "schema": { + "name": "date_updated", + "table": "users", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users", + "field": "date_updated", + "special": [ + "date-updated" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 4, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "name", + "type": "string", + "schema": { + "name": "name", + "table": "users", + "data_type": "character varying", + "default_value": null, + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users", + "field": "name", + "special": null, + "interface": "input", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 4, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "user_updated", + "type": "uuid", + "schema": { + "name": "user_updated", + "table": "users", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "users", + "field": "user_updated", + "special": [ + "user-updated" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 5, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "tmp_password", + "type": "string", + "schema": { + "name": "tmp_password", + "table": "users", + "data_type": "character varying", + "default_value": null, + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users", + "field": "tmp_password", + "special": null, + "interface": "input", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 5, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": true, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "sites", + "type": "alias", + "schema": null, + "meta": { + "collection": "users", + "field": "sites", + "special": [ + "m2m" + ], + "interface": "list-m2m", + "options": { + "layout": "table", + "enableCreate": false, + "enableLink": true, + "fields": [ + "sites_id.company_id", + "sites_id.name" + ] + }, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 6, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users", + "field": "system_info", + "type": "alias", + "schema": null, + "meta": { + "collection": "users", + "field": "system_info", + "special": [ + "alias", + "no-data", + "group" + ], + "interface": "group-raw", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 7, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users_sites", + "field": "id", + "type": "uuid", + "schema": { + "name": "id", + "table": "users_sites", + "data_type": "uuid", + "default_value": "gen_random_uuid()", + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": true, + "is_indexed": false, + "is_primary_key": true, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "users_sites", + "field": "id", + "special": null, + "interface": null, + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": true, + "sort": 1, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users_sites", + "field": "users_id", + "type": "uuid", + "schema": { + "name": "users_id", + "table": "users_sites", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "users_sites", + "field": "users_id", + "special": null, + "interface": null, + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": true, + "sort": 2, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "users_sites", + "field": "sites_id", + "type": "uuid", + "schema": { + "name": "sites_id", + "table": "users_sites", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "sites", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "users_sites", + "field": "sites_id", + "special": null, + "interface": null, + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": true, + "sort": 3, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "id", + "type": "uuid", + "schema": { + "name": "id", + "table": "systems", + "data_type": "uuid", + "default_value": "gen_random_uuid()", + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": true, + "is_indexed": false, + "is_primary_key": true, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "systems", + "field": "id", + "special": null, + "interface": "input", + "options": null, + "display": null, + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 1, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "system_key", + "type": "string", + "schema": { + "name": "system_key", + "table": "systems", + "data_type": "character varying", + "default_value": null, + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": true, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "systems", + "field": "system_key", + "special": null, + "interface": "input", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 1, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": true, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "date_created", + "type": "timestamp", + "schema": { + "name": "date_created", + "table": "systems", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "systems", + "field": "date_created", + "special": [ + "date-created" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "status", + "type": "string", + "schema": { + "name": "status", + "table": "systems", + "data_type": "character varying", + "default_value": "ACTIVE", + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": false, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "systems", + "field": "status", + "special": null, + "interface": "select-dropdown", + "options": { + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "display": "labels", + "display_options": { + "showAsDot": true, + "choices": [ + { + "text": "ACTIVE", + "value": "ACTIVE", + "color": "var(--theme--primary)" + }, + { + "text": "INACTIVE", + "value": "INACTIVE", + "color": "var(--theme--foreground)" + } + ] + }, + "readonly": false, + "hidden": false, + "sort": 2, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "user_created", + "type": "uuid", + "schema": { + "name": "user_created", + "table": "systems", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "systems", + "field": "user_created", + "special": [ + "user-created" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 3, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "name", + "type": "string", + "schema": { + "name": "name", + "table": "systems", + "data_type": "character varying", + "default_value": null, + "generation_expression": null, + "max_length": 255, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "systems", + "field": "name", + "special": null, + "interface": "input", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 3, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "date_updated", + "type": "timestamp", + "schema": { + "name": "date_updated", + "table": "systems", + "data_type": "timestamp with time zone", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": null, + "foreign_key_table": null, + "foreign_key_column": null, + "comment": null + }, + "meta": { + "collection": "systems", + "field": "date_updated", + "special": [ + "date-updated" + ], + "interface": "datetime", + "options": null, + "display": "datetime", + "display_options": { + "relative": true + }, + "readonly": true, + "hidden": true, + "sort": 4, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "user_updated", + "type": "uuid", + "schema": { + "name": "user_updated", + "table": "systems", + "data_type": "uuid", + "default_value": null, + "generation_expression": null, + "max_length": null, + "numeric_precision": null, + "numeric_scale": null, + "is_generated": false, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "has_auto_increment": false, + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "comment": null + }, + "meta": { + "collection": "systems", + "field": "user_updated", + "special": [ + "user-updated" + ], + "interface": "select-dropdown-m2o", + "options": { + "template": "{{avatar}} {{first_name}} {{last_name}}" + }, + "display": "user", + "display_options": null, + "readonly": true, + "hidden": true, + "sort": 5, + "width": "half", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": "system_info", + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "system_info", + "type": "alias", + "schema": null, + "meta": { + "collection": "systems", + "field": "system_info", + "special": [ + "alias", + "no-data", + "group" + ], + "interface": "group-raw", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": 5, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } + }, + { + "collection": "systems", + "field": "roles", + "type": "alias", + "schema": null, + "meta": { + "collection": "systems", + "field": "roles", + "special": [ + "o2m" + ], + "interface": "list-o2m", + "options": null, + "display": null, + "display_options": null, + "readonly": false, + "hidden": false, + "sort": null, + "width": "full", + "translations": null, + "note": null, + "conditions": null, + "required": false, + "group": null, + "validation": null, + "validation_message": null, + "searchable": true + } } ], "relations": [ { - "collection": "sites", - "field": "company_id", - "related_collection": "companies", + "collection": "companies", + "field": "user_created", + "related_collection": "directus_users", "schema": { - "constraint_name": "sites_company_id_foreign", - "table": "sites", - "column": "company_id", + "constraint_name": "companies_user_created_foreign", + "table": "companies", + "column": "user_created", "foreign_key_schema": "public", - "foreign_key_table": "companies", + "foreign_key_table": "directus_users", "foreign_key_column": "id", "on_update": "NO ACTION", - "on_delete": "CASCADE" + "on_delete": "NO ACTION" }, "meta": { - "many_collection": "sites", - "many_field": "company_id", - "one_collection": "companies", + "many_collection": "companies", + "many_field": "user_created", + "one_collection": "directus_users", + "one_field": null, + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "companies", + "field": "user_updated", + "related_collection": "directus_users", + "schema": { + "constraint_name": "companies_user_updated_foreign", + "table": "companies", + "column": "user_updated", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "companies", + "many_field": "user_updated", + "one_collection": "directus_users", + "one_field": null, + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "roles", + "field": "user_created", + "related_collection": "directus_users", + "schema": { + "constraint_name": "roles_user_created_foreign", + "table": "roles", + "column": "user_created", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "roles", + "many_field": "user_created", + "one_collection": "directus_users", + "one_field": null, + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "roles", + "field": "user_updated", + "related_collection": "directus_users", + "schema": { + "constraint_name": "roles_user_updated_foreign", + "table": "roles", + "column": "user_updated", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "roles", + "many_field": "user_updated", + "one_collection": "directus_users", "one_field": null, "one_collection_field": null, "one_allowed_collections": null, @@ -3580,13 +3299,13 @@ "foreign_key_table": "systems", "foreign_key_column": "id", "on_update": "NO ACTION", - "on_delete": "CASCADE" + "on_delete": "NO ACTION" }, "meta": { "many_collection": "roles", "many_field": "system_id", "one_collection": "systems", - "one_field": null, + "one_field": "roles", "one_collection_field": null, "one_allowed_collections": null, "junction_field": null, @@ -3595,13 +3314,13 @@ } }, { - "collection": "site_roles", - "field": "site_id", + "collection": "roles_sites", + "field": "sites_id", "related_collection": "sites", "schema": { - "constraint_name": "site_roles_site_id_foreign", - "table": "site_roles", - "column": "site_id", + "constraint_name": "roles_sites_sites_id_foreign", + "table": "roles_sites", + "column": "sites_id", "foreign_key_schema": "public", "foreign_key_table": "sites", "foreign_key_column": "id", @@ -3609,25 +3328,25 @@ "on_delete": "CASCADE" }, "meta": { - "many_collection": "site_roles", - "many_field": "site_id", + "many_collection": "roles_sites", + "many_field": "sites_id", "one_collection": "sites", - "one_field": null, + "one_field": "roles", "one_collection_field": null, "one_allowed_collections": null, - "junction_field": null, + "junction_field": "roles_id", "sort_field": null, "one_deselect_action": "nullify" } }, { - "collection": "site_roles", - "field": "role_id", + "collection": "roles_sites", + "field": "roles_id", "related_collection": "roles", "schema": { - "constraint_name": "site_roles_role_id_foreign", - "table": "site_roles", - "column": "role_id", + "constraint_name": "roles_sites_roles_id_foreign", + "table": "roles_sites", + "column": "roles_id", "foreign_key_schema": "public", "foreign_key_table": "roles", "foreign_key_column": "id", @@ -3635,35 +3354,35 @@ "on_delete": "CASCADE" }, "meta": { - "many_collection": "site_roles", - "many_field": "role_id", + "many_collection": "roles_sites", + "many_field": "roles_id", "one_collection": "roles", - "one_field": null, + "one_field": "sites", "one_collection_field": null, "one_allowed_collections": null, - "junction_field": null, + "junction_field": "sites_id", "sort_field": null, - "one_deselect_action": "nullify" + "one_deselect_action": "delete" } }, { - "collection": "user_sites", - "field": "user_id", - "related_collection": "users", + "collection": "sites", + "field": "user_created", + "related_collection": "directus_users", "schema": { - "constraint_name": "user_sites_user_id_foreign", - "table": "user_sites", - "column": "user_id", + "constraint_name": "sites_user_created_foreign", + "table": "sites", + "column": "user_created", "foreign_key_schema": "public", - "foreign_key_table": "users", + "foreign_key_table": "directus_users", "foreign_key_column": "id", "on_update": "NO ACTION", - "on_delete": "CASCADE" + "on_delete": "NO ACTION" }, "meta": { - "many_collection": "user_sites", - "many_field": "user_id", - "one_collection": "users", + "many_collection": "sites", + "many_field": "user_created", + "one_collection": "directus_users", "one_field": null, "one_collection_field": null, "one_allowed_collections": null, @@ -3673,13 +3392,117 @@ } }, { - "collection": "user_sites", - "field": "site_id", + "collection": "sites", + "field": "user_updated", + "related_collection": "directus_users", + "schema": { + "constraint_name": "sites_user_updated_foreign", + "table": "sites", + "column": "user_updated", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "sites", + "many_field": "user_updated", + "one_collection": "directus_users", + "one_field": null, + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "sites", + "field": "company_id", + "related_collection": "companies", + "schema": { + "constraint_name": "sites_company_id_foreign", + "table": "sites", + "column": "company_id", + "foreign_key_schema": "public", + "foreign_key_table": "companies", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "sites", + "many_field": "company_id", + "one_collection": "companies", + "one_field": "sites", + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "users", + "field": "user_updated", + "related_collection": "directus_users", + "schema": { + "constraint_name": "users_user_updated_foreign", + "table": "users", + "column": "user_updated", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "users", + "many_field": "user_updated", + "one_collection": "directus_users", + "one_field": null, + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "users", + "field": "user_created", + "related_collection": "directus_users", + "schema": { + "constraint_name": "users_user_created_foreign", + "table": "users", + "column": "user_created", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "users", + "many_field": "user_created", + "one_collection": "directus_users", + "one_field": null, + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "users_sites", + "field": "sites_id", "related_collection": "sites", "schema": { - "constraint_name": "user_sites_site_id_foreign", - "table": "user_sites", - "column": "site_id", + "constraint_name": "users_sites_sites_id_foreign", + "table": "users_sites", + "column": "sites_id", "foreign_key_schema": "public", "foreign_key_table": "sites", "foreign_key_column": "id", @@ -3687,9 +3510,87 @@ "on_delete": "CASCADE" }, "meta": { - "many_collection": "user_sites", - "many_field": "site_id", + "many_collection": "users_sites", + "many_field": "sites_id", "one_collection": "sites", + "one_field": "users", + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": "users_id", + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "users_sites", + "field": "users_id", + "related_collection": "users", + "schema": { + "constraint_name": "users_sites_users_id_foreign", + "table": "users_sites", + "column": "users_id", + "foreign_key_schema": "public", + "foreign_key_table": "users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "CASCADE" + }, + "meta": { + "many_collection": "users_sites", + "many_field": "users_id", + "one_collection": "users", + "one_field": "sites", + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": "sites_id", + "sort_field": null, + "one_deselect_action": "delete" + } + }, + { + "collection": "systems", + "field": "user_created", + "related_collection": "directus_users", + "schema": { + "constraint_name": "systems_user_created_foreign", + "table": "systems", + "column": "user_created", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "systems", + "many_field": "user_created", + "one_collection": "directus_users", + "one_field": null, + "one_collection_field": null, + "one_allowed_collections": null, + "junction_field": null, + "sort_field": null, + "one_deselect_action": "nullify" + } + }, + { + "collection": "systems", + "field": "user_updated", + "related_collection": "directus_users", + "schema": { + "constraint_name": "systems_user_updated_foreign", + "table": "systems", + "column": "user_updated", + "foreign_key_schema": "public", + "foreign_key_table": "directus_users", + "foreign_key_column": "id", + "on_update": "NO ACTION", + "on_delete": "NO ACTION" + }, + "meta": { + "many_collection": "systems", + "many_field": "user_updated", + "one_collection": "directus_users", "one_field": null, "one_collection_field": null, "one_allowed_collections": null,