{ "namespaces": [ "public" ], "name": "public", "tables": [ { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "danak_subscription_id": { "name": "danak_subscription_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "name": { "name": "name", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "slug": { "name": "slug", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "domain": { "name": "domain", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "is_domain_verified": { "name": "is_domain_verified", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" }, "domain_verification_token": { "name": "domain_verification_token", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "domain_verified_at": { "name": "domain_verified_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "logo_url": { "name": "logo_url", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "zarinpal_merchant_id": { "name": "zarinpal_merchant_id", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" } }, "name": "business", "schema": "public", "indexes": [ { "columnNames": [ "danak_subscription_id" ], "composite": false, "keyName": "business_danak_subscription_id_unique", "constraint": true, "primary": false, "unique": true }, { "keyName": "business_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": {}, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "type": { "name": "type", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "enumItems": [ "monthly_charge", "water_bill" ], "mappedType": "enum" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "bill", "schema": "public", "indexes": [ { "keyName": "bill_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "bill_business_id_foreign": { "constraintName": "bill_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.bill", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(100)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 100, "mappedType": "string" }, "content": { "name": "content", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "publish_at": { "name": "publish_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "default": "null", "mappedType": "datetime" }, "is_important": { "name": "is_important", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "is_public": { "name": "is_public", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" } }, "name": "announcement", "schema": "public", "indexes": [ { "keyName": "announcement_is_public_created_at_index", "columnNames": [ "is_public", "created_at" ], "composite": true, "constraint": false, "primary": false, "unique": false }, { "keyName": "announcement_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "announcement_business_id_foreign": { "constraintName": "announcement_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.announcement", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "danak_user_id": { "name": "danak_user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "full_name": { "name": "full_name", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "email": { "name": "email", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "phone": { "name": "phone", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "business_staff", "schema": "public", "indexes": [ { "keyName": "business_staff_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "business_staff_business_id_foreign": { "constraintName": "business_staff_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.business_staff", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "icon_url": { "name": "icon_url", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "is_active": { "name": "is_active", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "true", "mappedType": "boolean" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "industry", "schema": "public", "indexes": [ { "columnNames": [ "title" ], "composite": false, "keyName": "industry_title_unique", "constraint": true, "primary": false, "unique": true }, { "keyName": "industry_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "industry_business_id_foreign": { "constraintName": "industry_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.industry", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "restrict", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "name": { "name": "name", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "enumItems": [ "zarinpal" ], "mappedType": "enum" }, "name_fa": { "name": "name_fa", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "logo_url": { "name": "logo_url", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "is_active": { "name": "is_active", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "true", "mappedType": "boolean" }, "description": { "name": "description", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "text" } }, "name": "payment_gateway", "schema": "public", "indexes": [ { "columnNames": [ "name" ], "composite": false, "keyName": "payment_gateway_name_unique", "constraint": true, "primary": false, "unique": true }, { "keyName": "payment_gateway_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": {}, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "name": { "name": "name", "type": "role_enum", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "role_enum", "default": "'USER'", "enumItems": [ "ADMIN", "USER" ], "mappedType": "enum" } }, "name": "role", "schema": "public", "indexes": [ { "keyName": "role_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": {}, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "description": { "name": "description", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "image_url": { "name": "image_url", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "link": { "name": "link", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "order": { "name": "order", "type": "int", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "0", "mappedType": "integer" }, "is_active": { "name": "is_active", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "true", "mappedType": "boolean" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "slider", "schema": "public", "indexes": [ { "keyName": "slider_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "slider_business_id_foreign": { "constraintName": "slider_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.slider", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "restrict", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "description": { "name": "description", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "text" }, "is_active": { "name": "is_active", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "true", "mappedType": "boolean" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "ticket_category", "schema": "public", "indexes": [ { "columnNames": [ "title" ], "composite": false, "keyName": "ticket_category_title_unique", "constraint": true, "primary": false, "unique": true }, { "keyName": "ticket_category_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "ticket_category_business_id_foreign": { "constraintName": "ticket_category_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.ticket_category", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "first_name": { "name": "first_name", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "last_name": { "name": "last_name", "type": "varchar(200)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 200, "mappedType": "string" }, "email": { "name": "email", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 150, "mappedType": "string" }, "phone": { "name": "phone", "type": "varchar(11)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 11, "mappedType": "string" }, "user_name": { "name": "user_name", "type": "varchar(50)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 50, "mappedType": "string" }, "password": { "name": "password", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "birth_date": { "name": "birth_date", "type": "varchar(12)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 12, "mappedType": "string" }, "national_code": { "name": "national_code", "type": "varchar(100)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 100, "mappedType": "string" }, "profile_pic": { "name": "profile_pic", "type": "varchar(100)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 100, "mappedType": "string" }, "email_verified": { "name": "email_verified", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" }, "role_id": { "name": "role_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "user", "schema": "public", "indexes": [ { "keyName": "user_phone_business_id_user_name_national_code_unique", "columnNames": [ "phone", "business_id", "user_name", "national_code" ], "composite": true, "constraint": true, "primary": false, "unique": true }, { "keyName": "user_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "user_role_id_foreign": { "constraintName": "user_role_id_foreign", "columnNames": [ "role_id" ], "localTableName": "public.user", "referencedColumnNames": [ "id" ], "referencedTableName": "public.role", "deleteRule": "restrict", "updateRule": "cascade" }, "user_business_id_foreign": { "constraintName": "user_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.user", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "restrict", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "token": { "name": "token", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "expires_at": { "name": "expires_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" } }, "name": "refresh_token", "schema": "public", "indexes": [ { "keyName": "refresh_token_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "refresh_token_user_id_foreign": { "constraintName": "refresh_token_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.refresh_token", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(250)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 250, "mappedType": "string" }, "message": { "name": "message", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "type": { "name": "type", "type": "notif_type", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "notif_type", "enumItems": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ], "mappedType": "enum" }, "is_read": { "name": "is_read", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" }, "recipient_id": { "name": "recipient_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "notification", "schema": "public", "indexes": [ { "keyName": "notification_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "notification_recipient_id_foreign": { "constraintName": "notification_recipient_id_foreign", "columnNames": [ "recipient_id" ], "localTableName": "public.notification", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "numeric_id": { "name": "numeric_id", "type": "serial", "unsigned": true, "autoincrement": true, "primary": false, "nullable": false, "mappedType": "integer" }, "title": { "name": "title", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "content": { "name": "content", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "is_read": { "name": "is_read", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "criticism", "schema": "public", "indexes": [ { "columnNames": [ "title" ], "composite": false, "keyName": "criticism_title_index", "constraint": false, "primary": false, "unique": false }, { "keyName": "criticism_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "criticism_user_id_foreign": { "constraintName": "criticism_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.criticism", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "cascade", "updateRule": "cascade" }, "criticism_business_id_foreign": { "constraintName": "criticism_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.criticism", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "file_url": { "name": "file_url", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "criticism_id": { "name": "criticism_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "criticism_file", "schema": "public", "indexes": [ { "keyName": "criticism_file_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "criticism_file_criticism_id_foreign": { "constraintName": "criticism_file_criticism_id_foreign", "columnNames": [ "criticism_id" ], "localTableName": "public.criticism_file", "referencedColumnNames": [ "id" ], "referencedTableName": "public.criticism", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "name": { "name": "name", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "chief_executive_officer": { "name": "chief_executive_officer", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "email": { "name": "email", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "phone": { "name": "phone", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "identification_number": { "name": "identification_number", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "date_of_establishment": { "name": "date_of_establishment", "type": "date", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 0, "mappedType": "date" }, "address": { "name": "address", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "map_address_link": { "name": "map_address_link", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "description": { "name": "description", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "website_url": { "name": "website_url", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "profile_image_url": { "name": "profile_image_url", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "cover_image_url": { "name": "cover_image_url", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "metrage": { "name": "metrage", "type": "int", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "integer" }, "is_active": { "name": "is_active", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "true", "mappedType": "boolean" }, "status": { "name": "status", "type": "company_status", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "company_status", "enumItems": [ "APPROVED", "PENDING", "REJECTED" ], "mappedType": "enum" }, "industry_id": { "name": "industry_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "company", "schema": "public", "indexes": [ { "columnNames": [ "name" ], "composite": false, "keyName": "company_name_unique", "constraint": true, "primary": false, "unique": true }, { "columnNames": [ "email" ], "composite": false, "keyName": "company_email_unique", "constraint": true, "primary": false, "unique": true }, { "columnNames": [ "phone" ], "composite": false, "keyName": "company_phone_unique", "constraint": true, "primary": false, "unique": true }, { "columnNames": [ "identification_number" ], "composite": false, "keyName": "company_identification_number_unique", "constraint": true, "primary": false, "unique": true }, { "columnNames": [ "user_id" ], "composite": false, "keyName": "company_user_id_unique", "constraint": true, "primary": false, "unique": true }, { "keyName": "company_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "company_industry_id_foreign": { "constraintName": "company_industry_id_foreign", "columnNames": [ "industry_id" ], "localTableName": "public.company", "referencedColumnNames": [ "id" ], "referencedTableName": "public.industry", "deleteRule": "restrict", "updateRule": "cascade" }, "company_business_id_foreign": { "constraintName": "company_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.company", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "restrict", "updateRule": "cascade" }, "company_user_id_foreign": { "constraintName": "company_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.company", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "numeric_id": { "name": "numeric_id", "type": "serial", "unsigned": true, "autoincrement": true, "primary": false, "nullable": false, "mappedType": "integer" }, "subject": { "name": "subject", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "status": { "name": "status", "type": "ticket_status", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "ticket_status", "default": "'PENDING'", "enumItems": [ "PENDING", "ANSWERED", "CLOSED" ], "mappedType": "enum" }, "priority": { "name": "priority", "type": "ticket_priority", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "ticket_priority", "enumItems": [ "LOW", "MEDIUM", "HIGH" ], "mappedType": "enum" }, "company_id": { "name": "company_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "uuid" }, "assigned_to_id": { "name": "assigned_to_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "uuid" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "category_id": { "name": "category_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "uuid" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "ticket", "schema": "public", "indexes": [ { "keyName": "ticket_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "ticket_company_id_foreign": { "constraintName": "ticket_company_id_foreign", "columnNames": [ "company_id" ], "localTableName": "public.ticket", "referencedColumnNames": [ "id" ], "referencedTableName": "public.company", "deleteRule": "set null", "updateRule": "cascade" }, "ticket_assigned_to_id_foreign": { "constraintName": "ticket_assigned_to_id_foreign", "columnNames": [ "assigned_to_id" ], "localTableName": "public.ticket", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business_staff", "deleteRule": "set null", "updateRule": "cascade" }, "ticket_user_id_foreign": { "constraintName": "ticket_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.ticket", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "cascade", "updateRule": "cascade" }, "ticket_category_id_foreign": { "constraintName": "ticket_category_id_foreign", "columnNames": [ "category_id" ], "localTableName": "public.ticket", "referencedColumnNames": [ "id" ], "referencedTableName": "public.ticket_category", "deleteRule": "set null", "updateRule": "cascade" }, "ticket_business_id_foreign": { "constraintName": "ticket_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.ticket", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "content": { "name": "content", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "ticket_id": { "name": "ticket_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "author_id": { "name": "author_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "uuid" }, "external_author_id": { "name": "external_author_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "uuid" } }, "name": "ticket_message", "schema": "public", "indexes": [ { "keyName": "ticket_message_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "ticket_message_ticket_id_foreign": { "constraintName": "ticket_message_ticket_id_foreign", "columnNames": [ "ticket_id" ], "localTableName": "public.ticket_message", "referencedColumnNames": [ "id" ], "referencedTableName": "public.ticket", "deleteRule": "cascade", "updateRule": "cascade" }, "ticket_message_author_id_foreign": { "constraintName": "ticket_message_author_id_foreign", "columnNames": [ "author_id" ], "localTableName": "public.ticket_message", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "cascade", "updateRule": "cascade" }, "ticket_message_external_author_id_foreign": { "constraintName": "ticket_message_external_author_id_foreign", "columnNames": [ "external_author_id" ], "localTableName": "public.ticket_message", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business_staff", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "attachment_url": { "name": "attachment_url", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 150, "mappedType": "string" }, "ticket_message_id": { "name": "ticket_message_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "ticket_message_attachment", "schema": "public", "indexes": [ { "keyName": "ticket_message_attachment_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "ticket_message_attachment_ticket_message_id_foreign": { "constraintName": "ticket_message_attachment_ticket_message_id_foreign", "columnNames": [ "ticket_message_id" ], "localTableName": "public.ticket_message_attachment", "referencedColumnNames": [ "id" ], "referencedTableName": "public.ticket_message", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "numeric_id": { "name": "numeric_id", "type": "serial", "unsigned": true, "autoincrement": true, "primary": false, "nullable": false, "mappedType": "integer" }, "company_id": { "name": "company_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "total_price": { "name": "total_price", "type": "numeric", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "precision": 16, "scale": 2, "mappedType": "decimal" }, "original_price": { "name": "original_price", "type": "numeric", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "precision": 16, "scale": 2, "mappedType": "decimal" }, "status": { "name": "status", "type": "invoice_status", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "invoice_status", "default": "'PENDING'", "enumItems": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ], "mappedType": "enum" }, "due_date": { "name": "due_date", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "mappedType": "datetime" }, "paid_at": { "name": "paid_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "tax": { "name": "tax", "type": "numeric", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "precision": 16, "scale": 2, "mappedType": "decimal" }, "late_fee": { "name": "late_fee", "type": "numeric", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "precision": 16, "scale": 2, "mappedType": "decimal" }, "is_recurring": { "name": "is_recurring", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" }, "recurring_period": { "name": "recurring_period", "type": "smallint", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "enum" }, "max_recurring_cycles": { "name": "max_recurring_cycles", "type": "int", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "0", "mappedType": "integer" }, "current_recurring_cycle": { "name": "current_recurring_cycle", "type": "int", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "0", "mappedType": "integer" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "bill_id": { "name": "bill_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "uuid" } }, "name": "invoice", "schema": "public", "indexes": [ { "keyName": "invoice_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "invoice_company_id_foreign": { "constraintName": "invoice_company_id_foreign", "columnNames": [ "company_id" ], "localTableName": "public.invoice", "referencedColumnNames": [ "id" ], "referencedTableName": "public.company", "deleteRule": "cascade", "updateRule": "cascade" }, "invoice_business_id_foreign": { "constraintName": "invoice_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.invoice", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" }, "invoice_bill_id_foreign": { "constraintName": "invoice_bill_id_foreign", "columnNames": [ "bill_id" ], "localTableName": "public.invoice", "referencedColumnNames": [ "id" ], "referencedTableName": "public.bill", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "amount": { "name": "amount", "type": "numeric", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "precision": 16, "scale": 2, "mappedType": "decimal" }, "reference": { "name": "reference", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "transaction_id": { "name": "transaction_id", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 150, "mappedType": "string" }, "status": { "name": "status", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "'PENDING'", "enumItems": [ "PENDING", "COMPLETED", "FAILED", "CANCELLED" ], "mappedType": "enum" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "payment_gateway_id": { "name": "payment_gateway_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "invoice_id": { "name": "invoice_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "payment", "schema": "public", "indexes": [ { "keyName": "payment_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "payment_user_id_foreign": { "constraintName": "payment_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.payment", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "cascade", "updateRule": "cascade" }, "payment_payment_gateway_id_foreign": { "constraintName": "payment_payment_gateway_id_foreign", "columnNames": [ "payment_gateway_id" ], "localTableName": "public.payment", "referencedColumnNames": [ "id" ], "referencedTableName": "public.payment_gateway", "deleteRule": "cascade", "updateRule": "cascade" }, "payment_business_id_foreign": { "constraintName": "payment_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.payment", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" }, "payment_invoice_id_foreign": { "constraintName": "payment_invoice_id_foreign", "columnNames": [ "invoice_id" ], "localTableName": "public.payment", "referencedColumnNames": [ "id" ], "referencedTableName": "public.invoice", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "invoice_id": { "name": "invoice_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "name": { "name": "name", "type": "varchar(150)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 150, "mappedType": "string" }, "count": { "name": "count", "type": "int", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "integer" }, "discount": { "name": "discount", "type": "numeric(16,2)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "precision": 16, "scale": 2, "mappedType": "decimal" }, "unit_price": { "name": "unit_price", "type": "numeric(16,2)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "precision": 16, "scale": 2, "mappedType": "decimal" }, "total_price": { "name": "total_price", "type": "numeric(16,2)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "precision": 16, "scale": 2, "mappedType": "decimal" } }, "name": "invoice_item", "schema": "public", "indexes": [ { "keyName": "invoice_item_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "invoice_item_invoice_id_foreign": { "constraintName": "invoice_item_invoice_id_foreign", "columnNames": [ "invoice_id" ], "localTableName": "public.invoice_item", "referencedColumnNames": [ "id" ], "referencedTableName": "public.invoice", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(250)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 250, "mappedType": "string" }, "image_url": { "name": "image_url", "type": "varchar(250)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 250, "mappedType": "string" }, "company_id": { "name": "company_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "company_service", "schema": "public", "indexes": [ { "keyName": "company_service_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "company_service_company_id_foreign": { "constraintName": "company_service_company_id_foreign", "columnNames": [ "company_id" ], "localTableName": "public.company_service", "referencedColumnNames": [ "id" ], "referencedTableName": "public.company", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "reject_reason": { "name": "reject_reason", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "text" }, "request_status": { "name": "request_status", "type": "company_request_status", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "company_request_status", "default": "'PENDING'", "enumItems": [ "PENDING", "APPROVED", "REJECTED" ], "mappedType": "enum" }, "company_id": { "name": "company_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "company_request", "schema": "public", "indexes": [ { "keyName": "company_request_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "company_request_company_id_foreign": { "constraintName": "company_request_company_id_foreign", "columnNames": [ "company_id" ], "localTableName": "public.company_request", "referencedColumnNames": [ "id" ], "referencedTableName": "public.company", "updateRule": "cascade" }, "company_request_business_id_foreign": { "constraintName": "company_request_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.company_request", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "updateRule": "cascade" }, "company_request_user_id_foreign": { "constraintName": "company_request_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.company_request", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(250)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 250, "mappedType": "string" }, "image_url": { "name": "image_url", "type": "varchar(250)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 250, "mappedType": "string" }, "company_id": { "name": "company_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" } }, "name": "company_product", "schema": "public", "indexes": [ { "keyName": "company_product_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "company_product_company_id_foreign": { "constraintName": "company_product_company_id_foreign", "columnNames": [ "company_id" ], "localTableName": "public.company_product", "referencedColumnNames": [ "id" ], "referencedTableName": "public.company", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "business_id": { "name": "business_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "company_id": { "name": "company_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "number": { "name": "number", "type": "numeric(10,0)", "unsigned": true, "autoincrement": true, "primary": false, "nullable": false, "precision": 10, "scale": 0, "mappedType": "decimal" }, "driver_name": { "name": "driver_name", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "driver_phone": { "name": "driver_phone", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "origin": { "name": "origin", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "car_type": { "name": "car_type", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "plaque": { "name": "plaque", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "description": { "name": "description", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "attachments": { "name": "attachments", "type": "jsonb", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "json" }, "exit_at": { "name": "exit_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "status": { "name": "status", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" } }, "name": "barname", "schema": "public", "indexes": [ { "keyName": "barname_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "barname_business_id_foreign": { "constraintName": "barname_business_id_foreign", "columnNames": [ "business_id" ], "localTableName": "public.barname", "referencedColumnNames": [ "id" ], "referencedTableName": "public.business", "deleteRule": "cascade", "updateRule": "cascade" }, "barname_company_id_foreign": { "constraintName": "barname_company_id_foreign", "columnNames": [ "company_id" ], "localTableName": "public.barname", "referencedColumnNames": [ "id" ], "referencedTableName": "public.company", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "title": { "name": "title", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 255, "mappedType": "string" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "status": { "name": "status", "type": "chat_session_status", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "chat_session_status", "default": "'active'", "enumItems": [ "active", "closed", "archived" ], "mappedType": "enum" }, "context": { "name": "context", "type": "jsonb", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "json" }, "last_message_at": { "name": "last_message_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" } }, "name": "chat_session", "schema": "public", "indexes": [ { "keyName": "chat_session_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "chat_session_user_id_foreign": { "constraintName": "chat_session_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.chat_session", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "content": { "name": "content", "type": "text", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "text" }, "type": { "name": "type", "type": "message_type", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "message_type", "enumItems": [ "user", "bot", "system" ], "mappedType": "enum" }, "status": { "name": "status", "type": "message_status", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "nativeEnumName": "message_status", "default": "'sent'", "enumItems": [ "sent", "delivered", "read", "failed" ], "mappedType": "enum" }, "session_id": { "name": "session_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "sender_id": { "name": "sender_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "uuid" }, "metadata": { "name": "metadata", "type": "jsonb", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "mappedType": "json" }, "response_to_id": { "name": "response_to_id", "type": "varchar(255)", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 255, "mappedType": "string" }, "tokens_used": { "name": "tokens_used", "type": "int", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "0", "mappedType": "integer" } }, "name": "chat_message", "schema": "public", "indexes": [ { "keyName": "chat_message_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "chat_message_session_id_foreign": { "constraintName": "chat_message_session_id_foreign", "columnNames": [ "session_id" ], "localTableName": "public.chat_message", "referencedColumnNames": [ "id" ], "referencedTableName": "public.chat_session", "updateRule": "cascade" }, "chat_message_sender_id_foreign": { "constraintName": "chat_message_sender_id_foreign", "columnNames": [ "sender_id" ], "localTableName": "public.chat_message", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "set null", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }, { "columns": { "id": { "name": "id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "created_at": { "name": "created_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "updated_at": { "name": "updated_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "length": 6, "default": "current_timestamp", "mappedType": "datetime" }, "deleted_at": { "name": "deleted_at", "type": "timestamptz", "unsigned": false, "autoincrement": false, "primary": false, "nullable": true, "length": 6, "mappedType": "datetime" }, "user_id": { "name": "user_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "announcement_id": { "name": "announcement_id", "type": "uuid", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "mappedType": "uuid" }, "is_read": { "name": "is_read", "type": "boolean", "unsigned": false, "autoincrement": false, "primary": false, "nullable": false, "default": "false", "mappedType": "boolean" } }, "name": "user_announcement", "schema": "public", "indexes": [ { "keyName": "user_announcement_pkey", "columnNames": [ "id" ], "composite": false, "constraint": true, "primary": true, "unique": true } ], "checks": [], "foreignKeys": { "user_announcement_user_id_foreign": { "constraintName": "user_announcement_user_id_foreign", "columnNames": [ "user_id" ], "localTableName": "public.user_announcement", "referencedColumnNames": [ "id" ], "referencedTableName": "public.user", "deleteRule": "cascade", "updateRule": "cascade" }, "user_announcement_announcement_id_foreign": { "constraintName": "user_announcement_announcement_id_foreign", "columnNames": [ "announcement_id" ], "localTableName": "public.user_announcement", "referencedColumnNames": [ "id" ], "referencedTableName": "public.announcement", "deleteRule": "cascade", "updateRule": "cascade" } }, "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } } ], "nativeEnums": { "role_enum": { "name": "role_enum", "schema": "public", "items": [ "ADMIN", "USER" ] }, "notif_type": { "name": "notif_type", "schema": "public", "items": [ "OTP", "USER_LOGIN", "ANNOUNCEMENT", "WALLET_CHARGE", "WALLET_DEDUCTION", "BILL_INVOICE_REMINDER", "BILL_INVOICE", "APPROVE_INVOICE", "CREATE_INVOICE", "INVOICE_OVERDUE", "CREATE_SERVICE", "UNBLOCK_SERVICE", "BLOCK_SERVICE", "ANSWER_TICKET", "CREATE_TICKET", "ASSIGN_TICKET", "RECURRING_INVOICE", "PAYMENT_REMINDER", "PAYMENT_CANCELLATION", "NEW_CUSTOMER", "NEW_TICKET", "NEW_CRITICISM" ] }, "company_status": { "name": "company_status", "schema": "public", "items": [ "APPROVED", "PENDING", "REJECTED" ] }, "ticket_status": { "name": "ticket_status", "schema": "public", "items": [ "PENDING", "ANSWERED", "CLOSED" ] }, "ticket_priority": { "name": "ticket_priority", "schema": "public", "items": [ "LOW", "MEDIUM", "HIGH" ] }, "invoice_status": { "name": "invoice_status", "schema": "public", "items": [ "DRAFT", "PENDING", "WAIT_PAYMENT", "PAID", "ARCHIVED", "OVERDUE" ] }, "company_request_status": { "name": "company_request_status", "schema": "public", "items": [ "PENDING", "APPROVED", "REJECTED" ] }, "chat_session_status": { "name": "chat_session_status", "schema": "public", "items": [ "active", "closed", "archived" ] }, "message_type": { "name": "message_type", "schema": "public", "items": [ "user", "bot", "system" ] }, "message_status": { "name": "message_status", "schema": "public", "items": [ "sent", "delivered", "read", "failed" ] } } }