1024 lines
26 KiB
JSON
1024 lines
26 KiB
JSON
{
|
|
"id": "a0101695-385c-4a06-8311-608e5c56ecd0",
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.access_logs": {
|
|
"name": "access_logs",
|
|
"schema": "",
|
|
"columns": {
|
|
"member_id": {
|
|
"name": "member_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"device_id": {
|
|
"name": "device_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"accessed_at": {
|
|
"name": "accessed_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"access_logs_member_id_idx": {
|
|
"name": "access_logs_member_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "member_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"access_logs_device_id_idx": {
|
|
"name": "access_logs_device_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "device_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"access_logs_accessed_at_idx": {
|
|
"name": "access_logs_accessed_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "accessed_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"access_logs_member_id_members_id_fk": {
|
|
"name": "access_logs_member_id_members_id_fk",
|
|
"tableFrom": "access_logs",
|
|
"tableTo": "members",
|
|
"columnsFrom": [
|
|
"member_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"access_logs_device_id_devices_id_fk": {
|
|
"name": "access_logs_device_id_devices_id_fk",
|
|
"tableFrom": "access_logs",
|
|
"tableTo": "devices",
|
|
"columnsFrom": [
|
|
"device_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.devices": {
|
|
"name": "devices",
|
|
"schema": "",
|
|
"columns": {
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"api_key": {
|
|
"name": "api_key",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "device_type",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'RFID_SCANNER'"
|
|
},
|
|
"last_seen_at": {
|
|
"name": "last_seen_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"devices_api_key_idx": {
|
|
"name": "devices_api_key_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "api_key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"devices_type_idx": {
|
|
"name": "devices_type_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"devices_name_idx": {
|
|
"name": "devices_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"devices_api_key_unique": {
|
|
"name": "devices_api_key_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"api_key"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.management_users": {
|
|
"name": "management_users",
|
|
"schema": "",
|
|
"columns": {
|
|
"first_name": {
|
|
"name": "first_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"last_name": {
|
|
"name": "last_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"password_hash": {
|
|
"name": "password_hash",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "management_user_role",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'ADMIN'"
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"management_users_username_idx": {
|
|
"name": "management_users_username_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "username",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"management_users_enabled_idx": {
|
|
"name": "management_users_enabled_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "enabled",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"management_users_username_unique": {
|
|
"name": "management_users_username_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"username"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.member_rfid_cards": {
|
|
"name": "member_rfid_cards",
|
|
"schema": "",
|
|
"columns": {
|
|
"member_id": {
|
|
"name": "member_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"card_id": {
|
|
"name": "card_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "card_assignment_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'ASSIGNED'"
|
|
},
|
|
"issued_at": {
|
|
"name": "issued_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"returned_at": {
|
|
"name": "returned_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"member_rfid_cards_member_id_idx": {
|
|
"name": "member_rfid_cards_member_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "member_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"member_rfid_cards_card_id_idx": {
|
|
"name": "member_rfid_cards_card_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "card_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"member_rfid_cards_status_idx": {
|
|
"name": "member_rfid_cards_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"member_rfid_cards_member_card_status_idx": {
|
|
"name": "member_rfid_cards_member_card_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "member_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "card_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"member_rfid_cards_member_id_members_id_fk": {
|
|
"name": "member_rfid_cards_member_id_members_id_fk",
|
|
"tableFrom": "member_rfid_cards",
|
|
"tableTo": "members",
|
|
"columnsFrom": [
|
|
"member_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"member_rfid_cards_card_id_rfid_cards_id_fk": {
|
|
"name": "member_rfid_cards_card_id_rfid_cards_id_fk",
|
|
"tableFrom": "member_rfid_cards",
|
|
"tableTo": "rfid_cards",
|
|
"columnsFrom": [
|
|
"card_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.members": {
|
|
"name": "members",
|
|
"schema": "",
|
|
"columns": {
|
|
"first_name": {
|
|
"name": "first_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"last_name": {
|
|
"name": "last_name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"birth_date": {
|
|
"name": "birth_date",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"membership_number": {
|
|
"name": "membership_number",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"occupation": {
|
|
"name": "occupation",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"street": {
|
|
"name": "street",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"house_number": {
|
|
"name": "house_number",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"postal_code": {
|
|
"name": "postal_code",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"city": {
|
|
"name": "city",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"phone_home": {
|
|
"name": "phone_home",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"phone_work": {
|
|
"name": "phone_work",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"phone_mobile": {
|
|
"name": "phone_mobile",
|
|
"type": "varchar(20)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"guest_account": {
|
|
"name": "guest_account",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"joined_at": {
|
|
"name": "joined_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"free_text_function": {
|
|
"name": "free_text_function",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"free_text_comment": {
|
|
"name": "free_text_comment",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"password_hash": {
|
|
"name": "password_hash",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"profile_image": {
|
|
"name": "profile_image",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"allow_self_service": {
|
|
"name": "allow_self_service",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"members_membership_number_idx": {
|
|
"name": "members_membership_number_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "membership_number",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"members_email_idx": {
|
|
"name": "members_email_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "email",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"members_guest_account_idx": {
|
|
"name": "members_guest_account_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "guest_account",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"members_name_idx": {
|
|
"name": "members_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "first_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "last_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"members_membership_number_unique": {
|
|
"name": "members_membership_number_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"membership_number"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.rfid_cards": {
|
|
"name": "rfid_cards",
|
|
"schema": "",
|
|
"columns": {
|
|
"rfid_id": {
|
|
"name": "rfid_id",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "rfid_card_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'NEW'"
|
|
},
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"rfid_cards_rfid_id_idx": {
|
|
"name": "rfid_cards_rfid_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "rfid_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"rfid_cards_status_idx": {
|
|
"name": "rfid_cards_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"rfid_cards_rfid_id_unique": {
|
|
"name": "rfid_cards_rfid_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"rfid_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.system_logs": {
|
|
"name": "system_logs",
|
|
"schema": "",
|
|
"columns": {
|
|
"type": {
|
|
"name": "type",
|
|
"type": "system_log_type",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"payload": {
|
|
"name": "payload",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"system_logs_type_idx": {
|
|
"name": "system_logs_type_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"system_logs_user_id_idx": {
|
|
"name": "system_logs_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"system_logs_created_at_idx": {
|
|
"name": "system_logs_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"system_logs_name_idx": {
|
|
"name": "system_logs_name_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"system_logs_user_id_management_users_id_fk": {
|
|
"name": "system_logs_user_id_management_users_id_fk",
|
|
"tableFrom": "system_logs",
|
|
"tableTo": "management_users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {
|
|
"public.card_assignment_status": {
|
|
"name": "card_assignment_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"ASSIGNED",
|
|
"RETURNED"
|
|
]
|
|
},
|
|
"public.device_type": {
|
|
"name": "device_type",
|
|
"schema": "public",
|
|
"values": [
|
|
"RFID_SCANNER",
|
|
"LOCK_SYSTEM"
|
|
]
|
|
},
|
|
"public.management_user_role": {
|
|
"name": "management_user_role",
|
|
"schema": "public",
|
|
"values": [
|
|
"ADMIN"
|
|
]
|
|
},
|
|
"public.rfid_card_status": {
|
|
"name": "rfid_card_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"NEW",
|
|
"ENGRAVED",
|
|
"LOST",
|
|
"DISPOSED"
|
|
]
|
|
},
|
|
"public.system_log_type": {
|
|
"name": "system_log_type",
|
|
"schema": "public",
|
|
"values": [
|
|
"ACTION",
|
|
"INFO",
|
|
"WARNING",
|
|
"ERROR"
|
|
]
|
|
}
|
|
},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |