- 新增 /api/admin/songs/batch-reject.post 批量驳回接口(事务清排期/投票/扣接纳数/黑名单去重/异步通知) - requireSongAdmin 三角色校验 + createApiError 统一错误包装 - scheduleDaysBefore/After 四字段排期可见范围限制(开放 API 与公开排期接口三处缓存路径 + DB 条件过滤) - submissionNoteAutoModeration 基于黑名单 KEYWORD/LANGUAGE/GENRE 自动判定留言 publicStatus,命中自动关闭 submissionNotePublic - 更新 songs/request.post 与 songs/[id]/update.put 接入自动审查逻辑
3953 lines
101 KiB
JSON
3953 lines
101 KiB
JSON
{
|
|
"id": "e55ad241-91ce-4c7e-9d3a-79433b19976e",
|
|
"prevId": "9a604776-4a2c-47e2-ac0f-87bdc9c94abf",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.api_key_permissions": {
|
|
"name": "api_key_permissions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"api_key_id": {
|
|
"name": "api_key_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"permission": {
|
|
"name": "permission",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.api_keys": {
|
|
"name": "api_keys",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"key_hash": {
|
|
"name": "key_hash",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"key_prefix": {
|
|
"name": "key_prefix",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"is_active": {
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"last_used_at": {
|
|
"name": "last_used_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by_user_id": {
|
|
"name": "created_by_user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"usage_count": {
|
|
"name": "usage_count",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"api_keys_key_hash_unique": {
|
|
"name": "api_keys_key_hash_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"key_hash"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.api_logs": {
|
|
"name": "api_logs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"api_key_id": {
|
|
"name": "api_key_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"endpoint": {
|
|
"name": "endpoint",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"method": {
|
|
"name": "method",
|
|
"type": "varchar(10)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"ip_address": {
|
|
"name": "ip_address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_agent": {
|
|
"name": "user_agent",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status_code": {
|
|
"name": "status_code",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"response_time_ms": {
|
|
"name": "response_time_ms",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"request_body": {
|
|
"name": "request_body",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"response_body": {
|
|
"name": "response_body",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"error_message": {
|
|
"name": "error_message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.auth_sessions": {
|
|
"name": "auth_sessions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"session_token": {
|
|
"name": "session_token",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"ip_address": {
|
|
"name": "ip_address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"user_agent": {
|
|
"name": "user_agent",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_active_at": {
|
|
"name": "last_active_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"is_revoked": {
|
|
"name": "is_revoked",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"browser": {
|
|
"name": "browser",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"operating_system": {
|
|
"name": "operating_system",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"device": {
|
|
"name": "device",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"login_method": {
|
|
"name": "login_method",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'password'"
|
|
},
|
|
"revoked_at": {
|
|
"name": "revoked_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"revoked_reason": {
|
|
"name": "revoked_reason",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"auth_sessions_user_active_idx": {
|
|
"name": "auth_sessions_user_active_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "is_revoked",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "expires_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"auth_sessions_expires_at_idx": {
|
|
"name": "auth_sessions_expires_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "expires_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"auth_sessions_last_active_idx": {
|
|
"name": "auth_sessions_last_active_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "last_active_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"auth_sessions_session_token_unique": {
|
|
"name": "auth_sessions_session_token_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "session_token",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"auth_sessions_user_id_User_id_fk": {
|
|
"name": "auth_sessions_user_id_User_id_fk",
|
|
"tableFrom": "auth_sessions",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"auth_sessions_session_token_unique": {
|
|
"name": "auth_sessions_session_token_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"session_token"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.backup_records": {
|
|
"name": "backup_records",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"filename": {
|
|
"name": "filename",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"file_path": {
|
|
"name": "file_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"file_size": {
|
|
"name": "file_size",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'MANUAL'"
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'COMPLETED'"
|
|
},
|
|
"error_message": {
|
|
"name": "error_message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"started_at": {
|
|
"name": "started_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"completed_at": {
|
|
"name": "completed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"backup_records_created_at_idx": {
|
|
"name": "backup_records_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "created_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"backup_records_status_idx": {
|
|
"name": "backup_records_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.card_code_redemptions": {
|
|
"name": "card_code_redemptions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"card_code_id": {
|
|
"name": "card_code_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"redeemed_at": {
|
|
"name": "redeemed_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"song_id": {
|
|
"name": "song_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"purpose": {
|
|
"name": "purpose",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {
|
|
"card_code_redemptions_user_id_idx": {
|
|
"name": "card_code_redemptions_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"card_code_redemptions_card_code_id_idx": {
|
|
"name": "card_code_redemptions_card_code_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "card_code_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"card_code_redemptions_card_code_id_card_codes_id_fk": {
|
|
"name": "card_code_redemptions_card_code_id_card_codes_id_fk",
|
|
"tableFrom": "card_code_redemptions",
|
|
"tableTo": "card_codes",
|
|
"columnsFrom": [
|
|
"card_code_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"card_code_redemptions_user_id_User_id_fk": {
|
|
"name": "card_code_redemptions_user_id_User_id_fk",
|
|
"tableFrom": "card_code_redemptions",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"card_code_redemptions_song_id_Song_id_fk": {
|
|
"name": "card_code_redemptions_song_id_Song_id_fk",
|
|
"tableFrom": "card_code_redemptions",
|
|
"tableTo": "Song",
|
|
"columnsFrom": [
|
|
"song_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.card_codes": {
|
|
"name": "card_codes",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"code": {
|
|
"name": "code",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "card_code_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'AVAILABLE'"
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"locked_at": {
|
|
"name": "locked_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"locked_by": {
|
|
"name": "locked_by",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"batch_id": {
|
|
"name": "batch_id",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"note": {
|
|
"name": "note",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"card_codes_status_idx": {
|
|
"name": "card_codes_status_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "status",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"card_codes_batch_id_idx": {
|
|
"name": "card_codes_batch_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "batch_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"card_codes_expires_at_idx": {
|
|
"name": "card_codes_expires_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "expires_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"card_codes_code_unique": {
|
|
"name": "card_codes_code_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"code"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.ChangelogEntry": {
|
|
"name": "ChangelogEntry",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"published": {
|
|
"name": "published",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"publishedAt": {
|
|
"name": "publishedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"createdBy": {
|
|
"name": "createdBy",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.collaboration_logs": {
|
|
"name": "collaboration_logs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"collaborator_id": {
|
|
"name": "collaborator_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"action": {
|
|
"name": "action",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"operator_id": {
|
|
"name": "operator_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"ip_address": {
|
|
"name": "ip_address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.EmailTemplate": {
|
|
"name": "EmailTemplate",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(200)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"subject": {
|
|
"name": "subject",
|
|
"type": "varchar(300)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"html": {
|
|
"name": "html",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"updatedByUserId": {
|
|
"name": "updatedByUserId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.ExpectedPlayDate": {
|
|
"name": "ExpectedPlayDate",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"date": {
|
|
"name": "date",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"availableSequences": {
|
|
"name": "availableSequences",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"ExpectedPlayDate_date_unique": {
|
|
"name": "ExpectedPlayDate_date_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"date"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.GradeClass": {
|
|
"name": "GradeClass",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"grade": {
|
|
"name": "grade",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"class": {
|
|
"name": "class",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"grade_class_unique": {
|
|
"name": "grade_class_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"grade",
|
|
"class"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.NotificationSettings": {
|
|
"name": "NotificationSettings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"songRequestEnabled": {
|
|
"name": "songRequestEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"songVotedEnabled": {
|
|
"name": "songVotedEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"songPlayedEnabled": {
|
|
"name": "songPlayedEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"refreshInterval": {
|
|
"name": "refreshInterval",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 60
|
|
},
|
|
"songVotedThreshold": {
|
|
"name": "songVotedThreshold",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.Notification": {
|
|
"name": "Notification",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"message": {
|
|
"name": "message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"read": {
|
|
"name": "read",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"songId": {
|
|
"name": "songId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"batch_id": {
|
|
"name": "batch_id",
|
|
"type": "uuid",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'SYSTEM'"
|
|
},
|
|
"sender_id": {
|
|
"name": "sender_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sender_name": {
|
|
"name": "sender_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sender_username": {
|
|
"name": "sender_username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"important": {
|
|
"name": "important",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"user_deleted": {
|
|
"name": "user_deleted",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"notification_user_important_read_created_idx": {
|
|
"name": "notification_user_important_read_created_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "userId",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "important",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "read",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "createdAt",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"notification_batch_id_idx": {
|
|
"name": "notification_batch_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "batch_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.oauth_providers": {
|
|
"name": "oauth_providers",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"displayName": {
|
|
"name": "displayName",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"clientId": {
|
|
"name": "clientId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"clientSecret": {
|
|
"name": "clientSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"authorizationEndpoint": {
|
|
"name": "authorizationEndpoint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"tokenEndpoint": {
|
|
"name": "tokenEndpoint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"userInfoEndpoint": {
|
|
"name": "userInfoEndpoint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"redirectUri": {
|
|
"name": "redirectUri",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"usernameClaim": {
|
|
"name": "usernameClaim",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'preferred_username'"
|
|
},
|
|
"nameClaim": {
|
|
"name": "nameClaim",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'name'"
|
|
},
|
|
"emailClaim": {
|
|
"name": "emailClaim",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'email'"
|
|
},
|
|
"avatarClaim": {
|
|
"name": "avatarClaim",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"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()"
|
|
},
|
|
"sortOrder": {
|
|
"name": "sortOrder",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.passkey_challenges": {
|
|
"name": "passkey_challenges",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"challenge": {
|
|
"name": "challenge",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"passkey_challenges_challenge_idx": {
|
|
"name": "passkey_challenges_challenge_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "challenge",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"passkey_challenges_expires_at_idx": {
|
|
"name": "passkey_challenges_expires_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "expires_at",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.PlayTime": {
|
|
"name": "PlayTime",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"startTime": {
|
|
"name": "startTime",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"endTime": {
|
|
"name": "endTime",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.RequestTime": {
|
|
"name": "RequestTime",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp(6)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp(6)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"startTime": {
|
|
"name": "startTime",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"endTime": {
|
|
"name": "endTime",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expected": {
|
|
"name": "expected",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"accepted": {
|
|
"name": "accepted",
|
|
"type": "bigint",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"past": {
|
|
"name": "past",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.schedule_song_pool": {
|
|
"name": "schedule_song_pool",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"song_id": {
|
|
"name": "song_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"target_play_date": {
|
|
"name": "target_play_date",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"priority": {
|
|
"name": "priority",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"added_by": {
|
|
"name": "added_by",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"note": {
|
|
"name": "note",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'PENDING'"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"schedule_song_pool_song_id_idx": {
|
|
"name": "schedule_song_pool_song_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "song_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"schedule_song_pool_target_date_idx": {
|
|
"name": "schedule_song_pool_target_date_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "target_play_date",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"schedule_song_pool_song_id_Song_id_fk": {
|
|
"name": "schedule_song_pool_song_id_Song_id_fk",
|
|
"tableFrom": "schedule_song_pool",
|
|
"tableTo": "Song",
|
|
"columnsFrom": [
|
|
"song_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.Schedule": {
|
|
"name": "Schedule",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"songId": {
|
|
"name": "songId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"playDate": {
|
|
"name": "playDate",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"played": {
|
|
"name": "played",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"sequence": {
|
|
"name": "sequence",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"playTimeId": {
|
|
"name": "playTimeId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"isDraft": {
|
|
"name": "isDraft",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"publishedAt": {
|
|
"name": "publishedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"replay_request_id": {
|
|
"name": "replay_request_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"schedule_published_song_idx": {
|
|
"name": "schedule_published_song_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "publishedAt",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "songId",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"schedule_published_date_idx": {
|
|
"name": "schedule_published_date_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "publishedAt",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "playDate",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.Semester": {
|
|
"name": "Semester",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"isActive": {
|
|
"name": "isActive",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.SongBlacklist": {
|
|
"name": "SongBlacklist",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "BlacklistType",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"reason": {
|
|
"name": "reason",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"isActive": {
|
|
"name": "isActive",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"createdBy": {
|
|
"name": "createdBy",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.song_collaborators": {
|
|
"name": "song_collaborators",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"song_id": {
|
|
"name": "song_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "collaborator_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'PENDING'"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.SongComment": {
|
|
"name": "SongComment",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"songId": {
|
|
"name": "songId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.song_replay_requests": {
|
|
"name": "song_replay_requests",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"song_id": {
|
|
"name": "song_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "replay_request_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'PENDING'"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"song_replay_requests_song_id_user_id_unique": {
|
|
"name": "song_replay_requests_song_id_user_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"song_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.Song": {
|
|
"name": "Song",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"kg_hash": {
|
|
"name": "kg_hash",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"singer": {
|
|
"name": "singer",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cover_url": {
|
|
"name": "cover_url",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"artist": {
|
|
"name": "artist",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"requesterId": {
|
|
"name": "requesterId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"played": {
|
|
"name": "played",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"playedAt": {
|
|
"name": "playedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "now()"
|
|
},
|
|
"semester": {
|
|
"name": "semester",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"preferredPlayTimeId": {
|
|
"name": "preferredPlayTimeId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cover": {
|
|
"name": "cover",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"playUrl": {
|
|
"name": "playUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"musicPlatform": {
|
|
"name": "musicPlatform",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"musicId": {
|
|
"name": "musicId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"submissionNote": {
|
|
"name": "submissionNote",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"submissionNotePublic": {
|
|
"name": "submissionNotePublic",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"hitRequestId": {
|
|
"name": "hitRequestId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expectedPlayDate": {
|
|
"name": "expectedPlayDate",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"expectedPlaySequence": {
|
|
"name": "expectedPlaySequence",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"durationSeconds": {
|
|
"name": "durationSeconds",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"submissionNotePublicStatus": {
|
|
"name": "submissionNotePublicStatus",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cardCodeId": {
|
|
"name": "cardCodeId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"song_card_code_id_idx": {
|
|
"name": "song_card_code_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "cardCodeId",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"song_semester_created_at_idx": {
|
|
"name": "song_semester_created_at_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "semester",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "createdAt",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"song_requester_id_idx": {
|
|
"name": "song_requester_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "requesterId",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"Song_cardCodeId_card_codes_id_fk": {
|
|
"name": "Song_cardCodeId_card_codes_id_fk",
|
|
"tableFrom": "Song",
|
|
"tableTo": "card_codes",
|
|
"columnsFrom": [
|
|
"cardCodeId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.submission_restriction_exemptions": {
|
|
"name": "submission_restriction_exemptions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"exemption_type": {
|
|
"name": "exemption_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"reason": {
|
|
"name": "reason",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"submission_restriction_exemptions_user_id_idx": {
|
|
"name": "submission_restriction_exemptions_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"submission_restriction_exemptions_user_id_User_id_fk": {
|
|
"name": "submission_restriction_exemptions_user_id_User_id_fk",
|
|
"tableFrom": "submission_restriction_exemptions",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"submission_restriction_exemptions_user_type_unique": {
|
|
"name": "submission_restriction_exemptions_user_type_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"user_id",
|
|
"exemption_type"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.SystemSettings": {
|
|
"name": "SystemSettings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"enablePlayTimeSelection": {
|
|
"name": "enablePlayTimeSelection",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"siteTitle": {
|
|
"name": "siteTitle",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"siteLogoUrl": {
|
|
"name": "siteLogoUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"schoolLogoHomeUrl": {
|
|
"name": "schoolLogoHomeUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"schoolLogoPrintUrl": {
|
|
"name": "schoolLogoPrintUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"siteDescription": {
|
|
"name": "siteDescription",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"siteVersion": {
|
|
"name": "siteVersion",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"submissionGuidelines": {
|
|
"name": "submissionGuidelines",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"icpNumber": {
|
|
"name": "icpNumber",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"gonganNumber": {
|
|
"name": "gonganNumber",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"enableSubmissionLimit": {
|
|
"name": "enableSubmissionLimit",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"dailySubmissionLimit": {
|
|
"name": "dailySubmissionLimit",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"weeklySubmissionLimit": {
|
|
"name": "weeklySubmissionLimit",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"monthlySubmissionLimit": {
|
|
"name": "monthlySubmissionLimit",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"showBlacklistKeywords": {
|
|
"name": "showBlacklistKeywords",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"hideStudentInfo": {
|
|
"name": "hideStudentInfo",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"smtpEnabled": {
|
|
"name": "smtpEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"smtpHost": {
|
|
"name": "smtpHost",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"smtpPort": {
|
|
"name": "smtpPort",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": 587
|
|
},
|
|
"smtpSecure": {
|
|
"name": "smtpSecure",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"smtpUsername": {
|
|
"name": "smtpUsername",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"smtpPassword": {
|
|
"name": "smtpPassword",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"smtpFromEmail": {
|
|
"name": "smtpFromEmail",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"smtpFromName": {
|
|
"name": "smtpFromName",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'校园广播站'"
|
|
},
|
|
"enableRequestTimeLimitation": {
|
|
"name": "enableRequestTimeLimitation",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"forceBlockAllRequests": {
|
|
"name": "forceBlockAllRequests",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"enableReplayRequests": {
|
|
"name": "enableReplayRequests",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"enableCollaborativeSubmission": {
|
|
"name": "enableCollaborativeSubmission",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"enableSubmissionRemarks": {
|
|
"name": "enableSubmissionRemarks",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"submissionNoteRequiresApproval": {
|
|
"name": "submissionNoteRequiresApproval",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"instanceId": {
|
|
"name": "instanceId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"telemetryEnabled": {
|
|
"name": "telemetryEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"showBeianIcon": {
|
|
"name": "showBeianIcon",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"scheduleDaysDisplay": {
|
|
"name": "scheduleDaysDisplay",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 7
|
|
},
|
|
"scheduleDaysEditable": {
|
|
"name": "scheduleDaysEditable",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 3
|
|
},
|
|
"scheduleDaysRequestable": {
|
|
"name": "scheduleDaysRequestable",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 14
|
|
},
|
|
"scheduleDaysBeforeEnabled": {
|
|
"name": "scheduleDaysBeforeEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"scheduleDaysBefore": {
|
|
"name": "scheduleDaysBefore",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"scheduleDaysAfterEnabled": {
|
|
"name": "scheduleDaysAfterEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"scheduleDaysAfter": {
|
|
"name": "scheduleDaysAfter",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 1
|
|
},
|
|
"forcePasswordChangeOnFirstLogin": {
|
|
"name": "forcePasswordChangeOnFirstLogin",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"enableSubmissionRestriction": {
|
|
"name": "enableSubmissionRestriction",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"submissionRestrictionScope": {
|
|
"name": "submissionRestrictionScope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'all'"
|
|
},
|
|
"sameSongRestrictionHours": {
|
|
"name": "sameSongRestrictionHours",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"sameArtistRestrictionHours": {
|
|
"name": "sameArtistRestrictionHours",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cardCodeEnabled": {
|
|
"name": "cardCodeEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"cardCodeSubmissionRequired": {
|
|
"name": "cardCodeSubmissionRequired",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"cardCodeVoteEnabled": {
|
|
"name": "cardCodeVoteEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"cardCodeReplayEnabled": {
|
|
"name": "cardCodeReplayEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"enableCardCodeRequests": {
|
|
"name": "enableCardCodeRequests",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"requireCardCodeForRequests": {
|
|
"name": "requireCardCodeForRequests",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"enableCardCodeLimitBypass": {
|
|
"name": "enableCardCodeLimitBypass",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"submissionRestrictionEnabled": {
|
|
"name": "submissionRestrictionEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"submissionRestrictionGradeEnabled": {
|
|
"name": "submissionRestrictionGradeEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"submissionRestrictionClassEnabled": {
|
|
"name": "submissionRestrictionClassEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"submissionRestrictionGraduateEnabled": {
|
|
"name": "submissionRestrictionGraduateEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"submissionRestrictionWithdrawnEnabled": {
|
|
"name": "submissionRestrictionWithdrawnEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"captchaProvider": {
|
|
"name": "captchaProvider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'TURNSTILE'"
|
|
},
|
|
"captchaEnabled": {
|
|
"name": "captchaEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"turnstileSiteKey": {
|
|
"name": "turnstileSiteKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"turnstileSecretKey": {
|
|
"name": "turnstileSecretKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"allowRegister": {
|
|
"name": "allowRegister",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"registerRequireEmail": {
|
|
"name": "registerRequireEmail",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"registerRequireEmailVerify": {
|
|
"name": "registerRequireEmailVerify",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"registerDefaultRole": {
|
|
"name": "registerDefaultRole",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'USER'"
|
|
},
|
|
"registerEnabledGradeClasses": {
|
|
"name": "registerEnabledGradeClasses",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"registerRequiresApproval": {
|
|
"name": "registerRequiresApproval",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"oauthRegisterRequiresApproval": {
|
|
"name": "oauthRegisterRequiresApproval",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"registerEmailRequired": {
|
|
"name": "registerEmailRequired",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"registerRequiresGradeClass": {
|
|
"name": "registerRequiresGradeClass",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"oauthEnabled": {
|
|
"name": "oauthEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"oauthAllowRegister": {
|
|
"name": "oauthAllowRegister",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"oauthAllowLogin": {
|
|
"name": "oauthAllowLogin",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"oauthAllowBind": {
|
|
"name": "oauthAllowBind",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"allowOAuthRegistration": {
|
|
"name": "allowOAuthRegistration",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"oauthRedirectUri": {
|
|
"name": "oauthRedirectUri",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"oauthStateSecret": {
|
|
"name": "oauthStateSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"oauthProviders": {
|
|
"name": "oauthProviders",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'[]'"
|
|
},
|
|
"githubOAuthEnabled": {
|
|
"name": "githubOAuthEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"githubClientId": {
|
|
"name": "githubClientId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"githubClientSecret": {
|
|
"name": "githubClientSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"casdoorOAuthEnabled": {
|
|
"name": "casdoorOAuthEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"casdoorServerUrl": {
|
|
"name": "casdoorServerUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"casdoorClientId": {
|
|
"name": "casdoorClientId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"casdoorClientSecret": {
|
|
"name": "casdoorClientSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"casdoorOrganizationName": {
|
|
"name": "casdoorOrganizationName",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"googleOAuthEnabled": {
|
|
"name": "googleOAuthEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"googleClientId": {
|
|
"name": "googleClientId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"googleClientSecret": {
|
|
"name": "googleClientSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"aggregateOAuthEnabled": {
|
|
"name": "aggregateOAuthEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"aggregateOAuthAppId": {
|
|
"name": "aggregateOAuthAppId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"aggregateOAuthAppKey": {
|
|
"name": "aggregateOAuthAppKey",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"aggregateOAuthLoginType": {
|
|
"name": "aggregateOAuthLoginType",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "'qq'"
|
|
},
|
|
"aggregateOAuthEndpoint": {
|
|
"name": "aggregateOAuthEndpoint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthEnabled": {
|
|
"name": "customOAuthEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"customOAuthDisplayName": {
|
|
"name": "customOAuthDisplayName",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthAuthorizeUrl": {
|
|
"name": "customOAuthAuthorizeUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthTokenUrl": {
|
|
"name": "customOAuthTokenUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthUserInfoUrl": {
|
|
"name": "customOAuthUserInfoUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthScope": {
|
|
"name": "customOAuthScope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthClientId": {
|
|
"name": "customOAuthClientId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthClientSecret": {
|
|
"name": "customOAuthClientSecret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthUserIdField": {
|
|
"name": "customOAuthUserIdField",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthUsernameField": {
|
|
"name": "customOAuthUsernameField",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthNameField": {
|
|
"name": "customOAuthNameField",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthEmailField": {
|
|
"name": "customOAuthEmailField",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"customOAuthAvatarField": {
|
|
"name": "customOAuthAvatarField",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"captchaMaxFailures": {
|
|
"name": "captchaMaxFailures",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 3
|
|
},
|
|
"autoBackupEnabled": {
|
|
"name": "autoBackupEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"autoBackupIntervalHours": {
|
|
"name": "autoBackupIntervalHours",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 24
|
|
},
|
|
"autoBackupRetentionDays": {
|
|
"name": "autoBackupRetentionDays",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 30
|
|
},
|
|
"autoBackupConfig": {
|
|
"name": "autoBackupConfig",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"statisticsCode": {
|
|
"name": "statisticsCode",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"statisticsCodeEnabled": {
|
|
"name": "statisticsCodeEnabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"defaultTheme": {
|
|
"name": "defaultTheme",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'System'"
|
|
},
|
|
"enabledThemes": {
|
|
"name": "enabledThemes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'[\"System\",\"ClassicDark\",\"ClassicLight\",\"ModernLight\"]'"
|
|
},
|
|
"enabledPlatforms": {
|
|
"name": "enabledPlatforms",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"platformOrder": {
|
|
"name": "platformOrder",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.UserIdentity": {
|
|
"name": "UserIdentity",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"providerUserId": {
|
|
"name": "providerUserId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"providerUsername": {
|
|
"name": "providerUsername",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"UserIdentity_userId_User_id_fk": {
|
|
"name": "UserIdentity_userId_User_id_fk",
|
|
"tableFrom": "UserIdentity",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"userId"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"UserIdentity_provider_providerUserId_unique": {
|
|
"name": "UserIdentity_provider_providerUserId_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"provider",
|
|
"providerUserId"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_passkeys": {
|
|
"name": "user_passkeys",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"public_key": {
|
|
"name": "public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"credential_device_type": {
|
|
"name": "credential_device_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"credential_backed_up": {
|
|
"name": "credential_backed_up",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"transports": {
|
|
"name": "transports",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"counter": {
|
|
"name": "counter",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"last_used_at": {
|
|
"name": "last_used_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_passkeys_user_id_idx": {
|
|
"name": "user_passkeys_user_id_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_passkeys_user_id_User_id_fk": {
|
|
"name": "user_passkeys_user_id_User_id_fk",
|
|
"tableFrom": "user_passkeys",
|
|
"tableTo": "User",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.user_status_logs": {
|
|
"name": "user_status_logs",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"old_status": {
|
|
"name": "old_status",
|
|
"type": "user_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"new_status": {
|
|
"name": "new_status",
|
|
"type": "user_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"reason": {
|
|
"name": "reason",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"operator_id": {
|
|
"name": "operator_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.User": {
|
|
"name": "User",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"grade": {
|
|
"name": "grade",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"class": {
|
|
"name": "class",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"studentId": {
|
|
"name": "studentId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'USER'"
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"emailVerified": {
|
|
"name": "emailVerified",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": false
|
|
},
|
|
"lastLogin": {
|
|
"name": "lastLogin",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"lastLoginIp": {
|
|
"name": "lastLoginIp",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"passwordChangedAt": {
|
|
"name": "passwordChangedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"forcePasswordChange": {
|
|
"name": "forcePasswordChange",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"meowNickname": {
|
|
"name": "meowNickname",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"meowBoundAt": {
|
|
"name": "meowBoundAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "user_status",
|
|
"typeSchema": "public",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'active'"
|
|
},
|
|
"statusChangedAt": {
|
|
"name": "statusChangedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": "now()"
|
|
},
|
|
"statusChangedBy": {
|
|
"name": "statusChangedBy",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"tokenVersion": {
|
|
"name": "tokenVersion",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"avatarProvider": {
|
|
"name": "avatarProvider",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"avatarProviderUserId": {
|
|
"name": "avatarProviderUserId",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"remark": {
|
|
"name": "remark",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"User_username_unique": {
|
|
"name": "User_username_unique",
|
|
"columns": [
|
|
{
|
|
"expression": "username",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.Vote": {
|
|
"name": "Vote",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
},
|
|
"songId": {
|
|
"name": "songId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {
|
|
"vote_user_song_idx": {
|
|
"name": "vote_user_song_idx",
|
|
"columns": [
|
|
{
|
|
"expression": "userId",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "songId",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"vote_song_user_unique": {
|
|
"name": "vote_song_user_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"songId",
|
|
"userId"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {
|
|
"public.BlacklistType": {
|
|
"name": "BlacklistType",
|
|
"schema": "public",
|
|
"values": [
|
|
"SONG",
|
|
"KEYWORD",
|
|
"LANGUAGE",
|
|
"GENRE"
|
|
]
|
|
},
|
|
"public.card_code_status": {
|
|
"name": "card_code_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"AVAILABLE",
|
|
"LOCKED",
|
|
"REDEEMED",
|
|
"INVALID"
|
|
]
|
|
},
|
|
"public.collaborator_status": {
|
|
"name": "collaborator_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"PENDING",
|
|
"ACCEPTED",
|
|
"REJECTED"
|
|
]
|
|
},
|
|
"public.replay_request_status": {
|
|
"name": "replay_request_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"PENDING",
|
|
"FULFILLED",
|
|
"REJECTED"
|
|
]
|
|
},
|
|
"public.user_status": {
|
|
"name": "user_status",
|
|
"schema": "public",
|
|
"values": [
|
|
"active",
|
|
"withdrawn",
|
|
"graduate",
|
|
"pending",
|
|
"rejected"
|
|
]
|
|
}
|
|
},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |