diff --git a/app/drizzle/migrations/0158_careful_bucky.sql b/app/drizzle/migrations/0158_careful_bucky.sql
new file mode 100644
index 00000000..8a2546f8
--- /dev/null
+++ b/app/drizzle/migrations/0158_careful_bucky.sql
@@ -0,0 +1,5 @@
+ALTER TABLE `GameAsset` ADD `createdAt` datetime(3) DEFAULT (CURRENT_TIMESTAMP(3)) NOT NULL;
+ALTER TABLE `GameAsset` ADD `updatedAt` datetime(3) DEFAULT (CURRENT_TIMESTAMP(3)) NOT NULL;
+ALTER TABLE `GameAsset` ADD `licenseDetails` text DEFAULT ('TNR') NOT NULL;
+ALTER TABLE `GameAsset` ADD `createdByUserId` varchar(191);
+UPDATE `GameAsset` SET licenseDetails = 'UPDATE `GameAsset` SET licenseDetails = "https://craftpix.net/file-licenses/"';
\ No newline at end of file
diff --git a/app/drizzle/migrations/meta/0158_snapshot.json b/app/drizzle/migrations/meta/0158_snapshot.json
new file mode 100644
index 00000000..967514f7
--- /dev/null
+++ b/app/drizzle/migrations/meta/0158_snapshot.json
@@ -0,0 +1,6685 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "68a2f7d8-ff62-4299-8361-c186aba27844",
+ "prevId": "8f6f3309-28b6-4e7a-846f-cfcbda44ce8b",
+ "tables": {
+ "ActionLog": {
+ "name": "ActionLog",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "tableName": {
+ "name": "tableName",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "changes": {
+ "name": "changes",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "relatedId": {
+ "name": "relatedId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "relatedText": {
+ "name": "relatedText",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "relatedImage": {
+ "name": "relatedImage",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "ActionLog_userId_idx": {
+ "name": "ActionLog_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "ActionLog_id": {
+ "name": "ActionLog_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "AiProfile": {
+ "name": "AiProfile",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rules": {
+ "name": "rules",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "AiProfile_userId_idx": {
+ "name": "AiProfile_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "AiProfile_id": {
+ "name": "AiProfile_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "AnbuSquad": {
+ "name": "AnbuSquad",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "leaderId": {
+ "name": "leaderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "villageId": {
+ "name": "villageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pvpActivity": {
+ "name": "pvpActivity",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "kageOrderId": {
+ "name": "kageOrderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "leaderOrderId": {
+ "name": "leaderOrderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "AnbuSquad_name_key": {
+ "name": "AnbuSquad_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ },
+ "AnbuSquad_leaderId_idx": {
+ "name": "AnbuSquad_leaderId_idx",
+ "columns": [
+ "leaderId"
+ ],
+ "isUnique": false
+ },
+ "AnbuSquad_villageId_idx": {
+ "name": "AnbuSquad_villageId_idx",
+ "columns": [
+ "villageId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "AnbuSquad_id": {
+ "name": "AnbuSquad_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Badge": {
+ "name": "Badge",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "Badge_name_key": {
+ "name": "Badge_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Badge_id": {
+ "name": "Badge_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "BankTransfers": {
+ "name": "BankTransfers",
+ "columns": {
+ "senderId": {
+ "name": "senderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "receiverId": {
+ "name": "receiverId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "amount": {
+ "name": "amount",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('bank','sensei','recruiter')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'bank'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "BankTransfers_senderId_idx": {
+ "name": "BankTransfers_senderId_idx",
+ "columns": [
+ "senderId"
+ ],
+ "isUnique": false
+ },
+ "BankTransfers_receiverId_idx": {
+ "name": "BankTransfers_receiverId_idx",
+ "columns": [
+ "receiverId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "Battle": {
+ "name": "Battle",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "roundStartAt": {
+ "name": "roundStartAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "background": {
+ "name": "background",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "battleType": {
+ "name": "battleType",
+ "type": "enum('ARENA','COMBAT','SPARRING','KAGE_CHALLENGE','CLAN_CHALLENGE','CLAN_BATTLE','TOURNAMENT','QUEST','VILLAGE_PROTECTOR','TRAINING')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "usersState": {
+ "name": "usersState",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "usersEffects": {
+ "name": "usersEffects",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "groundEffects": {
+ "name": "groundEffects",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rewardScaling": {
+ "name": "rewardScaling",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "version": {
+ "name": "version",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "round": {
+ "name": "round",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "activeUserId": {
+ "name": "activeUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "Battle_id_version_key": {
+ "name": "Battle_id_version_key",
+ "columns": [
+ "id",
+ "version"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Battle_id": {
+ "name": "Battle_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "BattleAction": {
+ "name": "BattleAction",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "battleId": {
+ "name": "battleId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "battleVersion": {
+ "name": "battleVersion",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "battleRound": {
+ "name": "battleRound",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "appliedEffects": {
+ "name": "appliedEffects",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "BattleAction_round_key": {
+ "name": "BattleAction_round_key",
+ "columns": [
+ "battleId",
+ "battleVersion",
+ "battleRound"
+ ],
+ "isUnique": true
+ },
+ "BattleAction_createdAt_idx": {
+ "name": "BattleAction_createdAt_idx",
+ "columns": [
+ "createdAt"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "BattleAction_id": {
+ "name": "BattleAction_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "BattleHistory": {
+ "name": "BattleHistory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "battleId": {
+ "name": "battleId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "battleType": {
+ "name": "battleType",
+ "type": "enum('ARENA','COMBAT','SPARRING','KAGE_CHALLENGE','CLAN_CHALLENGE','CLAN_BATTLE','TOURNAMENT','QUEST','VILLAGE_PROTECTOR','TRAINING')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "attackedId": {
+ "name": "attackedId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "defenderId": {
+ "name": "defenderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "BattleHistory_battleId_idx": {
+ "name": "BattleHistory_battleId_idx",
+ "columns": [
+ "battleId"
+ ],
+ "isUnique": false
+ },
+ "BattleHistory_attackedId_idx": {
+ "name": "BattleHistory_attackedId_idx",
+ "columns": [
+ "attackedId"
+ ],
+ "isUnique": false
+ },
+ "BattleHistory_defenderId_idx": {
+ "name": "BattleHistory_defenderId_idx",
+ "columns": [
+ "defenderId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "BattleHistory_id": {
+ "name": "BattleHistory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Bloodline": {
+ "name": "Bloodline",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "statClassification": {
+ "name": "statClassification",
+ "type": "enum('Highest','Ninjutsu','Genjutsu','Taijutsu','Bukijutsu')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "effects": {
+ "name": "effects",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "regenIncrease": {
+ "name": "regenIncrease",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "villageId": {
+ "name": "villageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "NULL"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "rank": {
+ "name": "rank",
+ "type": "enum('D','C','B','A','S','H')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "hidden": {
+ "name": "hidden",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "Bloodline_name_key": {
+ "name": "Bloodline_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ },
+ "Bloodline_image_key": {
+ "name": "Bloodline_image_key",
+ "columns": [
+ "image"
+ ],
+ "isUnique": true
+ },
+ "Bloodline_village_idx": {
+ "name": "Bloodline_village_idx",
+ "columns": [
+ "villageId"
+ ],
+ "isUnique": false
+ },
+ "Bloodline_rank_idx": {
+ "name": "Bloodline_rank_idx",
+ "columns": [
+ "rank"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Bloodline_id": {
+ "name": "Bloodline_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "BloodlineRolls": {
+ "name": "BloodlineRolls",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "bloodlineId": {
+ "name": "bloodlineId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "used": {
+ "name": "used",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('NATURAL','ITEM')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'NATURAL'"
+ },
+ "rank": {
+ "name": "rank",
+ "type": "enum('D','C','B','A','S','H')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "BloodlineRolls_userId_idx": {
+ "name": "BloodlineRolls_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "BloodlineRolls_bloodlineId_idx": {
+ "name": "BloodlineRolls_bloodlineId_idx",
+ "columns": [
+ "bloodlineId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "BloodlineRolls_id": {
+ "name": "BloodlineRolls_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Captcha": {
+ "name": "Captcha",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "captcha": {
+ "name": "captcha",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) + INTERVAL 1 DAY )"
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "used": {
+ "name": "used",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "Captcha_userId_key": {
+ "name": "Captcha_userId_key",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "Captcha_used_idx": {
+ "name": "Captcha_used_idx",
+ "columns": [
+ "used"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Captcha_id": {
+ "name": "Captcha_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Clan": {
+ "name": "Clan",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "villageId": {
+ "name": "villageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "founderId": {
+ "name": "founderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "leaderId": {
+ "name": "leaderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "coLeader1": {
+ "name": "coLeader1",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "coLeader2": {
+ "name": "coLeader2",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "coLeader3": {
+ "name": "coLeader3",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "coLeader4": {
+ "name": "coLeader4",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "leaderOrderId": {
+ "name": "leaderOrderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trainingBoost": {
+ "name": "trainingBoost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "ryoBoost": {
+ "name": "ryoBoost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "points": {
+ "name": "points",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "bank": {
+ "name": "bank",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "pvpActivity": {
+ "name": "pvpActivity",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "Clan_name_key": {
+ "name": "Clan_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ },
+ "Clan_village_idx": {
+ "name": "Clan_village_idx",
+ "columns": [
+ "villageId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Clan_id": {
+ "name": "Clan_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "ConceptImage": {
+ "name": "ConceptImage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'started'"
+ },
+ "hidden": {
+ "name": "hidden",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "prompt": {
+ "name": "prompt",
+ "type": "varchar(5000)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "negative_prompt": {
+ "name": "negative_prompt",
+ "type": "varchar(5000)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "seed": {
+ "name": "seed",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 42
+ },
+ "guidance_scale": {
+ "name": "guidance_scale",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 4
+ },
+ "n_likes": {
+ "name": "n_likes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "n_loves": {
+ "name": "n_loves",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "n_laugh": {
+ "name": "n_laugh",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "n_comments": {
+ "name": "n_comments",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "done": {
+ "name": "done",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "image_avatar_key": {
+ "name": "image_avatar_key",
+ "columns": [
+ "image"
+ ],
+ "isUnique": true
+ },
+ "image_done_idx": {
+ "name": "image_done_idx",
+ "columns": [
+ "done"
+ ],
+ "isUnique": false
+ },
+ "image_userId_idx": {
+ "name": "image_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "ConceptImage_id": {
+ "name": "ConceptImage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Conversation": {
+ "name": "Conversation",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdById": {
+ "name": "createdById",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "isLocked": {
+ "name": "isLocked",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "isPublic": {
+ "name": "isPublic",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ }
+ },
+ "indexes": {
+ "Conversation_title_key": {
+ "name": "Conversation_title_key",
+ "columns": [
+ "title"
+ ],
+ "isUnique": false
+ },
+ "Conversation_createdById_idx": {
+ "name": "Conversation_createdById_idx",
+ "columns": [
+ "createdById"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Conversation_id": {
+ "name": "Conversation_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "ConversationComment": {
+ "name": "ConversationComment",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "conversationId": {
+ "name": "conversationId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "isPinned": {
+ "name": "isPinned",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "ConversationComment_userId_idx": {
+ "name": "ConversationComment_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "ConversationComment_createdAt_idx": {
+ "name": "ConversationComment_createdAt_idx",
+ "columns": [
+ "createdAt"
+ ],
+ "isUnique": false
+ },
+ "ConversationComment_conversationId_idx": {
+ "name": "ConversationComment_conversationId_idx",
+ "columns": [
+ "conversationId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "ConversationComment_id": {
+ "name": "ConversationComment_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "DamageCalculation": {
+ "name": "DamageCalculation",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "state": {
+ "name": "state",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "active": {
+ "name": "active",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ }
+ },
+ "indexes": {
+ "DamageCalculation_userId_idx": {
+ "name": "DamageCalculation_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "DamageCalculation_createdAt_idx": {
+ "name": "DamageCalculation_createdAt_idx",
+ "columns": [
+ "createdAt"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "DamageCalculation_id": {
+ "name": "DamageCalculation_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "DataBattleAction": {
+ "name": "DataBattleAction",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('jutsu','item','bloodline','basic','ai')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "contentId": {
+ "name": "contentId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "battleType": {
+ "name": "battleType",
+ "type": "enum('ARENA','COMBAT','SPARRING','KAGE_CHALLENGE','CLAN_CHALLENGE','CLAN_BATTLE','TOURNAMENT','QUEST','VILLAGE_PROTECTOR','TRAINING')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "battleWon": {
+ "name": "battleWon",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "DataBattleActions_contentId_idx": {
+ "name": "DataBattleActions_contentId_idx",
+ "columns": [
+ "contentId"
+ ],
+ "isUnique": false
+ },
+ "DataBattleActions_type": {
+ "name": "DataBattleActions_type",
+ "columns": [
+ "type"
+ ],
+ "isUnique": false
+ },
+ "DataBattleActions_battleWon": {
+ "name": "DataBattleActions_battleWon",
+ "columns": [
+ "battleWon"
+ ],
+ "isUnique": false
+ },
+ "DataBattleActions_battleType": {
+ "name": "DataBattleActions_battleType",
+ "columns": [
+ "battleType"
+ ],
+ "isUnique": false
+ },
+ "DataBattleActions_createdAt": {
+ "name": "DataBattleActions_createdAt",
+ "columns": [
+ "createdAt"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "DataBattleAction_id": {
+ "name": "DataBattleAction_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "ForumBoard": {
+ "name": "ForumBoard",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "group": {
+ "name": "group",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "nPosts": {
+ "name": "nPosts",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "nThreads": {
+ "name": "nThreads",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "ForumBoard_name_key": {
+ "name": "ForumBoard_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "ForumBoard_id": {
+ "name": "ForumBoard_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "ForumPost": {
+ "name": "ForumPost",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threadId": {
+ "name": "threadId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "ForumPost_userId_idx": {
+ "name": "ForumPost_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "ForumPost_threadId_idx": {
+ "name": "ForumPost_threadId_idx",
+ "columns": [
+ "threadId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "ForumPost_id": {
+ "name": "ForumPost_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "ForumThread": {
+ "name": "ForumThread",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "boardId": {
+ "name": "boardId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "nPosts": {
+ "name": "nPosts",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "isPinned": {
+ "name": "isPinned",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "isLocked": {
+ "name": "isLocked",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "ForumThread_boardId_idx": {
+ "name": "ForumThread_boardId_idx",
+ "columns": [
+ "boardId"
+ ],
+ "isUnique": false
+ },
+ "ForumThread_userId_idx": {
+ "name": "ForumThread_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "ForumThread_id": {
+ "name": "ForumThread_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "GameAsset": {
+ "name": "GameAsset",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('STATIC','ANIMATION')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "frames": {
+ "name": "frames",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "speed": {
+ "name": "speed",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "licenseDetails": {
+ "name": "licenseDetails",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('TNR')"
+ },
+ "createdByUserId": {
+ "name": "createdByUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "onInitialBattleField": {
+ "name": "onInitialBattleField",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "GameAsset_type_idx": {
+ "name": "GameAsset_type_idx",
+ "columns": [
+ "type"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "GameAsset_id": {
+ "name": "GameAsset_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "GameRule": {
+ "name": "GameRule",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "name": {
+ "name": "name",
+ "columns": [
+ "name"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "GameRule_id": {
+ "name": "GameRule_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "GameSetting": {
+ "name": "GameSetting",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "time": {
+ "name": "time",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "name": {
+ "name": "name",
+ "columns": [
+ "name"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "GameSetting_id": {
+ "name": "GameSetting_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "HistoricalAvatar": {
+ "name": "HistoricalAvatar",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "avatar": {
+ "name": "avatar",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "replicateId": {
+ "name": "replicateId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'started'"
+ },
+ "done": {
+ "name": "done",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "HistoricalAvatar_replicateId_key": {
+ "name": "HistoricalAvatar_replicateId_key",
+ "columns": [
+ "replicateId"
+ ],
+ "isUnique": true
+ },
+ "HistoricalAvatar_avatar_key": {
+ "name": "HistoricalAvatar_avatar_key",
+ "columns": [
+ "avatar"
+ ],
+ "isUnique": true
+ },
+ "HistoricalAvatar_done_idx": {
+ "name": "HistoricalAvatar_done_idx",
+ "columns": [
+ "done"
+ ],
+ "isUnique": false
+ },
+ "HistoricalAvatar_userId_idx": {
+ "name": "HistoricalAvatar_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "HistoricalAvatar_id": {
+ "name": "HistoricalAvatar_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Item": {
+ "name": "Item",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "effects": {
+ "name": "effects",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "itemType": {
+ "name": "itemType",
+ "type": "enum('WEAPON','CONSUMABLE','ARMOR','ACCESSORY','MATERIAL','OTHER')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rarity": {
+ "name": "rarity",
+ "type": "enum('COMMON','RARE','EPIC','LEGENDARY')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "slot": {
+ "name": "slot",
+ "type": "enum('HEAD','CHEST','LEGS','FEET','HAND','ITEM','NONE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cooldown": {
+ "name": "cooldown",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "weaponType": {
+ "name": "weaponType",
+ "type": "enum('STAFF','AXE','FIST_WEAPON','SHURIKEN','SICKLE','DAGGER','SWORD','POLEARM','FLAIL','CHAIN','FAN','BOW','HAMMER','NONE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'NONE'"
+ },
+ "target": {
+ "name": "target",
+ "type": "enum('SELF','OTHER_USER','OPPONENT','ALLY','CHARACTER','GROUND','EMPTY_GROUND')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "method": {
+ "name": "method",
+ "type": "enum('SINGLE','ALL','AOE_CIRCLE_SPAWN','AOE_LINE_SHOOT','AOE_WALL_SHOOT','AOE_CIRCLE_SHOOT','AOE_SPIRAL_SHOOT')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'SINGLE'"
+ },
+ "cost": {
+ "name": "cost",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "reputationCost": {
+ "name": "reputationCost",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "stackSize": {
+ "name": "stackSize",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "destroyOnUse": {
+ "name": "destroyOnUse",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "range": {
+ "name": "range",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "chakraCost": {
+ "name": "chakraCost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "staminaCost": {
+ "name": "staminaCost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "healthCost": {
+ "name": "healthCost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "staminaCostReducePerLvl": {
+ "name": "staminaCostReducePerLvl",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "chakraCostReducePerLvl": {
+ "name": "chakraCostReducePerLvl",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "healthCostReducePerLvl": {
+ "name": "healthCostReducePerLvl",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "actionCostPerc": {
+ "name": "actionCostPerc",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 60
+ },
+ "battleDescription": {
+ "name": "battleDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('')"
+ },
+ "canStack": {
+ "name": "canStack",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "inShop": {
+ "name": "inShop",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "isEventItem": {
+ "name": "isEventItem",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "hidden": {
+ "name": "hidden",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "maxEquips": {
+ "name": "maxEquips",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "preventBattleUsage": {
+ "name": "preventBattleUsage",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "Item_name_key": {
+ "name": "Item_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ },
+ "Item_rarity_idx": {
+ "name": "Item_rarity_idx",
+ "columns": [
+ "rarity"
+ ],
+ "isUnique": false
+ },
+ "Item_itemType_idx": {
+ "name": "Item_itemType_idx",
+ "columns": [
+ "itemType"
+ ],
+ "isUnique": false
+ },
+ "Item_slot_idx": {
+ "name": "Item_slot_idx",
+ "columns": [
+ "slot"
+ ],
+ "isUnique": false
+ },
+ "Item_method_idx": {
+ "name": "Item_method_idx",
+ "columns": [
+ "method"
+ ],
+ "isUnique": false
+ },
+ "Item_target_idx": {
+ "name": "Item_target_idx",
+ "columns": [
+ "target"
+ ],
+ "isUnique": false
+ },
+ "Item_isEventItem_idx": {
+ "name": "Item_isEventItem_idx",
+ "columns": [
+ "isEventItem"
+ ],
+ "isUnique": false
+ },
+ "Item_onlyInShop_idx": {
+ "name": "Item_onlyInShop_idx",
+ "columns": [
+ "inShop"
+ ],
+ "isUnique": false
+ },
+ "Item_cost_idx": {
+ "name": "Item_cost_idx",
+ "columns": [
+ "cost"
+ ],
+ "isUnique": false
+ },
+ "Item_repsCost_idx": {
+ "name": "Item_repsCost_idx",
+ "columns": [
+ "reputationCost"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Item_id": {
+ "name": "Item_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Jutsu": {
+ "name": "Jutsu",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "extraBaseCost": {
+ "name": "extraBaseCost",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "effects": {
+ "name": "effects",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target": {
+ "name": "target",
+ "type": "enum('SELF','OTHER_USER','OPPONENT','ALLY','CHARACTER','GROUND','EMPTY_GROUND')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "range": {
+ "name": "range",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cooldown": {
+ "name": "cooldown",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "bloodlineId": {
+ "name": "bloodlineId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "requiredLevel": {
+ "name": "requiredLevel",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "requiredRank": {
+ "name": "requiredRank",
+ "type": "enum('STUDENT','GENIN','CHUNIN','JONIN','COMMANDER','ELDER','NONE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jutsuType": {
+ "name": "jutsuType",
+ "type": "enum('NORMAL','SPECIAL','BLOODLINE','FORBIDDEN','LOYALTY','CLAN','EVENT','AI')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jutsuWeapon": {
+ "name": "jutsuWeapon",
+ "type": "enum('STAFF','AXE','FIST_WEAPON','SHURIKEN','SICKLE','DAGGER','SWORD','POLEARM','FLAIL','CHAIN','FAN','BOW','HAMMER','NONE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'NONE'"
+ },
+ "statClassification": {
+ "name": "statClassification",
+ "type": "enum('Highest','Ninjutsu','Genjutsu','Taijutsu','Bukijutsu')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "battleDescription": {
+ "name": "battleDescription",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jutsuRank": {
+ "name": "jutsuRank",
+ "type": "enum('D','C','B','A','S','H')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'D'"
+ },
+ "actionCostPerc": {
+ "name": "actionCostPerc",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 80
+ },
+ "staminaCost": {
+ "name": "staminaCost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0.05
+ },
+ "chakraCost": {
+ "name": "chakraCost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0.05
+ },
+ "staminaCostReducePerLvl": {
+ "name": "staminaCostReducePerLvl",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "chakraCostReducePerLvl": {
+ "name": "chakraCostReducePerLvl",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "healthCostReducePerLvl": {
+ "name": "healthCostReducePerLvl",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "healthCost": {
+ "name": "healthCost",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "villageId": {
+ "name": "villageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "method": {
+ "name": "method",
+ "type": "enum('SINGLE','ALL','AOE_CIRCLE_SPAWN','AOE_LINE_SHOOT','AOE_WALL_SHOOT','AOE_CIRCLE_SHOOT','AOE_SPIRAL_SHOOT')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'SINGLE'"
+ },
+ "hidden": {
+ "name": "hidden",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "Jutsu_name_key": {
+ "name": "Jutsu_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ },
+ "Jutsu_image_key": {
+ "name": "Jutsu_image_key",
+ "columns": [
+ "image"
+ ],
+ "isUnique": true
+ },
+ "Jutsu_bloodlineId_idx": {
+ "name": "Jutsu_bloodlineId_idx",
+ "columns": [
+ "bloodlineId"
+ ],
+ "isUnique": false
+ },
+ "Jutsu_villageId_idx": {
+ "name": "Jutsu_villageId_idx",
+ "columns": [
+ "villageId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Jutsu_id": {
+ "name": "Jutsu_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "JutsuLoadout": {
+ "name": "JutsuLoadout",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "JutsuLoadout_userId_idx": {
+ "name": "JutsuLoadout_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "JutsuLoadout_id": {
+ "name": "JutsuLoadout_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "KageDefendedChallenges": {
+ "name": "KageDefendedChallenges",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "villageId": {
+ "name": "villageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kageId": {
+ "name": "kageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "didWin": {
+ "name": "didWin",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "rounds": {
+ "name": "rounds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "VillageKageChallenges_villageId_idx": {
+ "name": "VillageKageChallenges_villageId_idx",
+ "columns": [
+ "villageId"
+ ],
+ "isUnique": false
+ },
+ "VillageKageChallenges_userId_idx": {
+ "name": "VillageKageChallenges_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "VillageKageChallenges_kageID_idx": {
+ "name": "VillageKageChallenges_kageID_idx",
+ "columns": [
+ "kageId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "KageDefendedChallenges_id": {
+ "name": "KageDefendedChallenges_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "MpvpBattleQueue": {
+ "name": "MpvpBattleQueue",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "clan1Id": {
+ "name": "clan1Id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "clan2Id": {
+ "name": "clan2Id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "winnerId": {
+ "name": "winnerId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "battleId": {
+ "name": "battleId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "MpvpBattleQueue_battleId_idx": {
+ "name": "MpvpBattleQueue_battleId_idx",
+ "columns": [
+ "battleId"
+ ],
+ "isUnique": false
+ },
+ "MpvpBattleQueue_clan1Id_idx": {
+ "name": "MpvpBattleQueue_clan1Id_idx",
+ "columns": [
+ "clan1Id"
+ ],
+ "isUnique": false
+ },
+ "MpvpBattleQueue_clan2Id_idx": {
+ "name": "MpvpBattleQueue_clan2Id_idx",
+ "columns": [
+ "clan2Id"
+ ],
+ "isUnique": false
+ },
+ "MpvpBattleQueue_winnerId_idx": {
+ "name": "MpvpBattleQueue_winnerId_idx",
+ "columns": [
+ "winnerId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "MpvpBattleQueue_id": {
+ "name": "MpvpBattleQueue_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "MpvpBattleUser": {
+ "name": "MpvpBattleUser",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "clanBattleId": {
+ "name": "clanBattleId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "MpvpBattleUser_clanBattleId_idx": {
+ "name": "MpvpBattleUser_clanBattleId_idx",
+ "columns": [
+ "clanBattleId"
+ ],
+ "isUnique": false
+ },
+ "MpvpBattleUser_userId_idx": {
+ "name": "MpvpBattleUser_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "MpvpBattleUser_id": {
+ "name": "MpvpBattleUser_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Notification": {
+ "name": "Notification",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "Notification_createdAt_idx": {
+ "name": "Notification_createdAt_idx",
+ "columns": [
+ "createdAt"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Notification_id": {
+ "name": "Notification_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "PaypalSubscription": {
+ "name": "PaypalSubscription",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdById": {
+ "name": "createdById",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "affectedUserId": {
+ "name": "affectedUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "federalStatus": {
+ "name": "federalStatus",
+ "type": "enum('NONE','NORMAL','SILVER','GOLD')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "orderId": {
+ "name": "orderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "subscriptionId": {
+ "name": "subscriptionId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "PaypalSubscription_subscriptionId_key": {
+ "name": "PaypalSubscription_subscriptionId_key",
+ "columns": [
+ "subscriptionId"
+ ],
+ "isUnique": true
+ },
+ "PaypalSubscription_orderId_key": {
+ "name": "PaypalSubscription_orderId_key",
+ "columns": [
+ "orderId"
+ ],
+ "isUnique": true
+ },
+ "PaypalSubscription_createdById_idx": {
+ "name": "PaypalSubscription_createdById_idx",
+ "columns": [
+ "createdById"
+ ],
+ "isUnique": false
+ },
+ "PaypalSubscription_affectedUserId_idx": {
+ "name": "PaypalSubscription_affectedUserId_idx",
+ "columns": [
+ "affectedUserId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "PaypalSubscription_id": {
+ "name": "PaypalSubscription_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "PaypalTransaction": {
+ "name": "PaypalTransaction",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdById": {
+ "name": "createdById",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "affectedUserId": {
+ "name": "affectedUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "transactionId": {
+ "name": "transactionId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "transactionUpdatedDate": {
+ "name": "transactionUpdatedDate",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "orderId": {
+ "name": "orderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "invoiceId": {
+ "name": "invoiceId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "amount": {
+ "name": "amount",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reputationPoints": {
+ "name": "reputationPoints",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "currency": {
+ "name": "currency",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'USD'"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rawData": {
+ "name": "rawData",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "PaypalTransaction_orderId_key": {
+ "name": "PaypalTransaction_orderId_key",
+ "columns": [
+ "orderId"
+ ],
+ "isUnique": true
+ },
+ "PaypalTransaction_createdById_idx": {
+ "name": "PaypalTransaction_createdById_idx",
+ "columns": [
+ "createdById"
+ ],
+ "isUnique": false
+ },
+ "PaypalTransaction_affectedUserId_idx": {
+ "name": "PaypalTransaction_affectedUserId_idx",
+ "columns": [
+ "affectedUserId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "PaypalTransaction_id": {
+ "name": "PaypalTransaction_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "PaypalWebhookMessage": {
+ "name": "PaypalWebhookMessage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "eventType": {
+ "name": "eventType",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rawData": {
+ "name": "rawData",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handled": {
+ "name": "handled",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "PaypalWebhookMessage_id": {
+ "name": "PaypalWebhookMessage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Quest": {
+ "name": "Quest",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(5000)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "successDescription": {
+ "name": "successDescription",
+ "type": "varchar(5000)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "questRank": {
+ "name": "questRank",
+ "type": "enum('D','C','B','A','S','H')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'D'"
+ },
+ "requiredLevel": {
+ "name": "requiredLevel",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "maxLevel": {
+ "name": "maxLevel",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "requiredVillage": {
+ "name": "requiredVillage",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tierLevel": {
+ "name": "tierLevel",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timeFrame": {
+ "name": "timeFrame",
+ "type": "enum('daily','weekly','monthly','all_time')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "questType": {
+ "name": "questType",
+ "type": "enum('mission','crime','event','exam','errand','tier','daily','achievement')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "hidden": {
+ "name": "hidden",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "consecutiveObjectives": {
+ "name": "consecutiveObjectives",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "expiresAt": {
+ "name": "expiresAt",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "Quest_questType_idx": {
+ "name": "Quest_questType_idx",
+ "columns": [
+ "questType"
+ ],
+ "isUnique": false
+ },
+ "Quest_questRank_idx": {
+ "name": "Quest_questRank_idx",
+ "columns": [
+ "questRank"
+ ],
+ "isUnique": false
+ },
+ "Quest_requiredLevel_idx": {
+ "name": "Quest_requiredLevel_idx",
+ "columns": [
+ "requiredLevel"
+ ],
+ "isUnique": false
+ },
+ "Quest_maxLevel_idx": {
+ "name": "Quest_maxLevel_idx",
+ "columns": [
+ "maxLevel"
+ ],
+ "isUnique": false
+ },
+ "Quest_requiredVillage_idx": {
+ "name": "Quest_requiredVillage_idx",
+ "columns": [
+ "requiredVillage"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Quest_id": {
+ "name": "Quest_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "tierLevel": {
+ "name": "tierLevel",
+ "columns": [
+ "tierLevel"
+ ]
+ }
+ }
+ },
+ "QuestHistory": {
+ "name": "QuestHistory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "questId": {
+ "name": "questId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "questType": {
+ "name": "questType",
+ "type": "enum('mission','crime','event','exam','errand','tier','daily','achievement')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "endedAt": {
+ "name": "endedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "completed": {
+ "name": "completed",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "previousCompletes": {
+ "name": "previousCompletes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "previousAttempts": {
+ "name": "previousAttempts",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "QuestHistory_userId_idx": {
+ "name": "QuestHistory_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "QuestHistory_questType_idx": {
+ "name": "QuestHistory_questType_idx",
+ "columns": [
+ "questType"
+ ],
+ "isUnique": false
+ },
+ "QuestHistory_endedAt_idx": {
+ "name": "QuestHistory_endedAt_idx",
+ "columns": [
+ "endedAt"
+ ],
+ "isUnique": false
+ },
+ "QuestHistory_questId_idx": {
+ "name": "QuestHistory_questId_idx",
+ "columns": [
+ "questId"
+ ],
+ "isUnique": false
+ },
+ "QuestHistory_completed_idx": {
+ "name": "QuestHistory_completed_idx",
+ "columns": [
+ "completed"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "QuestHistory_id": {
+ "name": "QuestHistory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "ReportLog": {
+ "name": "ReportLog",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "targetUserId": {
+ "name": "targetUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "staffUserId": {
+ "name": "staffUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "ReportLog_targetUserId_idx": {
+ "name": "ReportLog_targetUserId_idx",
+ "columns": [
+ "targetUserId"
+ ],
+ "isUnique": false
+ },
+ "ReportLog_staffUserId_idx": {
+ "name": "ReportLog_staffUserId_idx",
+ "columns": [
+ "staffUserId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "ReportLog_id": {
+ "name": "ReportLog_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "RyoTrade": {
+ "name": "RyoTrade",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "creatorUserId": {
+ "name": "creatorUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "repsForSale": {
+ "name": "repsForSale",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "requestedRyo": {
+ "name": "requestedRyo",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ryoPerRep": {
+ "name": "ryoPerRep",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "purchaserUserId": {
+ "name": "purchaserUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "allowedPurchaserId": {
+ "name": "allowedPurchaserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "RyoTrade_creatorUserId_idx": {
+ "name": "RyoTrade_creatorUserId_idx",
+ "columns": [
+ "creatorUserId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "RyoTrade_id": {
+ "name": "RyoTrade_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Tournament": {
+ "name": "Tournament",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "round": {
+ "name": "round",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('CLAN')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rewards": {
+ "name": "rewards",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) + INTERVAL 1 DAY )"
+ },
+ "roundStartedAt": {
+ "name": "roundStartedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) + INTERVAL 1 DAY )"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "status": {
+ "name": "status",
+ "type": "enum('OPEN','IN_PROGRESS','COMPLETED')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'OPEN'"
+ }
+ },
+ "indexes": {
+ "Tournament_name_key": {
+ "name": "Tournament_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Tournament_id": {
+ "name": "Tournament_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "TournamentMatch": {
+ "name": "TournamentMatch",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tournamentId": {
+ "name": "tournamentId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "round": {
+ "name": "round",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "match": {
+ "name": "match",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state": {
+ "name": "state",
+ "type": "enum('WAITING','PLAYED','NO_SHOW')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'WAITING'"
+ },
+ "winnerId": {
+ "name": "winnerId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "battleId": {
+ "name": "battleId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "userId1": {
+ "name": "userId1",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId2": {
+ "name": "userId2",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "TournamentMatch_tournamentId_idx": {
+ "name": "TournamentMatch_tournamentId_idx",
+ "columns": [
+ "tournamentId"
+ ],
+ "isUnique": false
+ },
+ "TournamentMatch_userId1_idx": {
+ "name": "TournamentMatch_userId1_idx",
+ "columns": [
+ "userId1"
+ ],
+ "isUnique": false
+ },
+ "TournamentMatch_userId2_idx": {
+ "name": "TournamentMatch_userId2_idx",
+ "columns": [
+ "userId2"
+ ],
+ "isUnique": false
+ },
+ "TournamentMatch_winnerId_idx": {
+ "name": "TournamentMatch_winnerId_idx",
+ "columns": [
+ "winnerId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "TournamentMatch_id": {
+ "name": "TournamentMatch_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "TournamentRecord": {
+ "name": "TournamentRecord",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "round": {
+ "name": "round",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('CLAN')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rewards": {
+ "name": "rewards",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "startedAt": {
+ "name": "startedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) + INTERVAL 1 DAY )"
+ },
+ "winnerId": {
+ "name": "winnerId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "HistoricalTournament_name_key": {
+ "name": "HistoricalTournament_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "TournamentRecord_id": {
+ "name": "TournamentRecord_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "TrainingLog": {
+ "name": "TrainingLog",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "amount": {
+ "name": "amount",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "stat": {
+ "name": "stat",
+ "type": "enum('ninjutsuOffence','taijutsuOffence','genjutsuOffence','bukijutsuOffence','ninjutsuDefence','taijutsuDefence','genjutsuDefence','bukijutsuDefence','strength','speed','intelligence','willpower')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "speed": {
+ "name": "speed",
+ "type": "enum('15min','1hr','4hrs','8hrs')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "trainingFinishedAt": {
+ "name": "trainingFinishedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "TrainingLog_userId_idx": {
+ "name": "TrainingLog_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "TrainingLog_speed_idx": {
+ "name": "TrainingLog_speed_idx",
+ "columns": [
+ "speed"
+ ],
+ "isUnique": false
+ },
+ "TrainingLog_stat_idx": {
+ "name": "TrainingLog_stat_idx",
+ "columns": [
+ "stat"
+ ],
+ "isUnique": false
+ },
+ "TrainingLog_trainingFinishedAt_idx": {
+ "name": "TrainingLog_trainingFinishedAt_idx",
+ "columns": [
+ "trainingFinishedAt"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "TrainingLog_id": {
+ "name": "TrainingLog_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UsersInConversation": {
+ "name": "UsersInConversation",
+ "columns": {
+ "conversationId": {
+ "name": "conversationId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "assignedAt": {
+ "name": "assignedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "UsersInConversation_userId_idx": {
+ "name": "UsersInConversation_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UsersInConversation_conversationId_userId_pk": {
+ "name": "UsersInConversation_conversationId_userId_pk",
+ "columns": [
+ "conversationId",
+ "userId"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserAssociation": {
+ "name": "UserAssociation",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userOne": {
+ "name": "userOne",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userTwo": {
+ "name": "userTwo",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "associationType": {
+ "name": "associationType",
+ "type": "enum('MARRIAGE','DIVORCED')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'MARRIAGE'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "UserOne_UserTwo_UserAssociation_key": {
+ "name": "UserOne_UserTwo_UserAssociation_key",
+ "columns": [
+ "userOne",
+ "userTwo",
+ "associationType"
+ ],
+ "isUnique": true
+ },
+ "UserAttribute_userOne_idx": {
+ "name": "UserAttribute_userOne_idx",
+ "columns": [
+ "userOne"
+ ],
+ "isUnique": false
+ },
+ "UserAttribute_userTwo_idx": {
+ "name": "UserAttribute_userTwo_idx",
+ "columns": [
+ "userTwo"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserAssociation_id": {
+ "name": "UserAssociation_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserAttribute": {
+ "name": "UserAttribute",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "attribute": {
+ "name": "attribute",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "UserAttribute_attribute_userId_key": {
+ "name": "UserAttribute_attribute_userId_key",
+ "columns": [
+ "attribute",
+ "userId"
+ ],
+ "isUnique": true
+ },
+ "UserAttribute_userId_idx": {
+ "name": "UserAttribute_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserAttribute_id": {
+ "name": "UserAttribute_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserBadge": {
+ "name": "UserBadge",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "badgeId": {
+ "name": "badgeId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "UserBadge_userId_idx": {
+ "name": "UserBadge_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "UserBadge_badgeId_idx": {
+ "name": "UserBadge_badgeId_idx",
+ "columns": [
+ "badgeId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "UserBlackList": {
+ "name": "UserBlackList",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "creatorUserId": {
+ "name": "creatorUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "targetUserId": {
+ "name": "targetUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "BlackList_creatorUserId_idx": {
+ "name": "BlackList_creatorUserId_idx",
+ "columns": [
+ "creatorUserId"
+ ],
+ "isUnique": false
+ },
+ "BlackList_targetUserId_idx": {
+ "name": "BlackList_targetUserId_idx",
+ "columns": [
+ "targetUserId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserBlackList_id": {
+ "name": "UserBlackList_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserData": {
+ "name": "UserData",
+ "columns": {
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "recruiterId": {
+ "name": "recruiterId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "anbuId": {
+ "name": "anbuId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "clanId": {
+ "name": "clanId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jutsuLoadout": {
+ "name": "jutsuLoadout",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "nRecruited": {
+ "name": "nRecruited",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "lastIp": {
+ "name": "lastIp",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "curHealth": {
+ "name": "curHealth",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "maxHealth": {
+ "name": "maxHealth",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "curChakra": {
+ "name": "curChakra",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "maxChakra": {
+ "name": "maxChakra",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "curStamina": {
+ "name": "curStamina",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "maxStamina": {
+ "name": "maxStamina",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "regeneration": {
+ "name": "regeneration",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 60
+ },
+ "money": {
+ "name": "money",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "bank": {
+ "name": "bank",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "experience": {
+ "name": "experience",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "earnedExperience": {
+ "name": "earnedExperience",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "rank": {
+ "name": "rank",
+ "type": "enum('STUDENT','GENIN','CHUNIN','JONIN','COMMANDER','ELDER','NONE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'STUDENT'"
+ },
+ "isOutlaw": {
+ "name": "isOutlaw",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "level": {
+ "name": "level",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "villageId": {
+ "name": "villageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "bloodlineId": {
+ "name": "bloodlineId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "enum('AWAKE','HOSPITALIZED','TRAVEL','BATTLE','QUEUED','ASLEEP')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'AWAKE'"
+ },
+ "strength": {
+ "name": "strength",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "intelligence": {
+ "name": "intelligence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "willpower": {
+ "name": "willpower",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "speed": {
+ "name": "speed",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "ninjutsuOffence": {
+ "name": "ninjutsuOffence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "ninjutsuDefence": {
+ "name": "ninjutsuDefence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "genjutsuOffence": {
+ "name": "genjutsuOffence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "genjutsuDefence": {
+ "name": "genjutsuDefence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "taijutsuOffence": {
+ "name": "taijutsuOffence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "taijutsuDefence": {
+ "name": "taijutsuDefence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "bukijutsuDefence": {
+ "name": "bukijutsuDefence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "bukijutsuOffence": {
+ "name": "bukijutsuOffence",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "statsMultiplier": {
+ "name": "statsMultiplier",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "poolsMultiplier": {
+ "name": "poolsMultiplier",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "reputationPoints": {
+ "name": "reputationPoints",
+ "type": "float",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 5
+ },
+ "primaryElement": {
+ "name": "primaryElement",
+ "type": "enum('Fire','Water','Wind','Earth','Lightning','Ice','Crystal','Dust','Shadow','Wood','Scorch','Storm','Magnet','Yin-Yang','Lava','Explosion','Light','None')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "secondaryElement": {
+ "name": "secondaryElement",
+ "type": "enum('Fire','Water','Wind','Earth','Lightning','Ice','Crystal','Dust','Shadow','Wood','Scorch','Storm','Magnet','Yin-Yang','Lava','Explosion','Light','None')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "reputationPointsTotal": {
+ "name": "reputationPointsTotal",
+ "type": "float",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 5
+ },
+ "villagePrestige": {
+ "name": "villagePrestige",
+ "type": "float",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "federalStatus": {
+ "name": "federalStatus",
+ "type": "enum('NONE','NORMAL','SILVER','GOLD')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'NONE'"
+ },
+ "approvedTos": {
+ "name": "approvedTos",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "avatar": {
+ "name": "avatar",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 7
+ },
+ "location": {
+ "name": "location",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "joinedVillageAt": {
+ "name": "joinedVillageAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3) - INTERVAL 7 DAY)"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "questFinishAt": {
+ "name": "questFinishAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "activityStreak": {
+ "name": "activityStreak",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "deletionAt": {
+ "name": "deletionAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "travelFinishAt": {
+ "name": "travelFinishAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "isBanned": {
+ "name": "isBanned",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "isSilenced": {
+ "name": "isSilenced",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "role": {
+ "name": "role",
+ "type": "enum('USER','MODERATOR','CONTENT','EVENT','HEAD_MODERATOR','ADMIN','CONTENT-ADMIN')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'USER'"
+ },
+ "battleId": {
+ "name": "battleId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "isAi": {
+ "name": "isAi",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "isSummon": {
+ "name": "isSummon",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "isEvent": {
+ "name": "isEvent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "inArena": {
+ "name": "inArena",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "inboxNews": {
+ "name": "inboxNews",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "regenAt": {
+ "name": "regenAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "immunityUntil": {
+ "name": "immunityUntil",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "trainingStartedAt": {
+ "name": "trainingStartedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "trainingSpeed": {
+ "name": "trainingSpeed",
+ "type": "enum('15min','1hr','4hrs','8hrs')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'15min'"
+ },
+ "currentlyTraining": {
+ "name": "currentlyTraining",
+ "type": "enum('ninjutsuOffence','taijutsuOffence','genjutsuOffence','bukijutsuOffence','ninjutsuDefence','taijutsuDefence','genjutsuDefence','bukijutsuDefence','strength','speed','intelligence','willpower')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "unreadNotifications": {
+ "name": "unreadNotifications",
+ "type": "smallint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "unreadNews": {
+ "name": "unreadNews",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "questData": {
+ "name": "questData",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "senseiId": {
+ "name": "senseiId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "medicalExperience": {
+ "name": "medicalExperience",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "pvpFights": {
+ "name": "pvpFights",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "pveFights": {
+ "name": "pveFights",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "pvpActivity": {
+ "name": "pvpActivity",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "pvpStreak": {
+ "name": "pvpStreak",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "errands": {
+ "name": "errands",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "missionsD": {
+ "name": "missionsD",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "missionsC": {
+ "name": "missionsC",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "missionsB": {
+ "name": "missionsB",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "missionsA": {
+ "name": "missionsA",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "missionsS": {
+ "name": "missionsS",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "missionsH": {
+ "name": "missionsH",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "crimesD": {
+ "name": "crimesD",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "crimesC": {
+ "name": "crimesC",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "crimesB": {
+ "name": "crimesB",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "crimesA": {
+ "name": "crimesA",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "crimesS": {
+ "name": "crimesS",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "crimesH": {
+ "name": "crimesH",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "dailyArenaFights": {
+ "name": "dailyArenaFights",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "dailyMissions": {
+ "name": "dailyMissions",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "dailyErrands": {
+ "name": "dailyErrands",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "dailyTrainings": {
+ "name": "dailyTrainings",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "movedTooFastCount": {
+ "name": "movedTooFastCount",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "extraItemSlots": {
+ "name": "extraItemSlots",
+ "type": "smallint unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "extraJutsuSlots": {
+ "name": "extraJutsuSlots",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "customTitle": {
+ "name": "customTitle",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "marriageSlots": {
+ "name": "marriageSlots",
+ "type": "int unsigned",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "aiProfileId": {
+ "name": "aiProfileId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "effects": {
+ "name": "effects",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('[]')"
+ }
+ },
+ "indexes": {
+ "UserData_userId_key": {
+ "name": "UserData_userId_key",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": true
+ },
+ "UserData_isAi_idx": {
+ "name": "UserData_isAi_idx",
+ "columns": [
+ "isAi"
+ ],
+ "isUnique": false
+ },
+ "UserData_rank_idx": {
+ "name": "UserData_rank_idx",
+ "columns": [
+ "rank"
+ ],
+ "isUnique": false
+ },
+ "UserData_role_idx": {
+ "name": "UserData_role_idx",
+ "columns": [
+ "role"
+ ],
+ "isUnique": false
+ },
+ "UserData_clanId_idx": {
+ "name": "UserData_clanId_idx",
+ "columns": [
+ "clanId"
+ ],
+ "isUnique": false
+ },
+ "UserData_anbuId_idx": {
+ "name": "UserData_anbuId_idx",
+ "columns": [
+ "anbuId"
+ ],
+ "isUnique": false
+ },
+ "UserData_jutsuLoadout_idx": {
+ "name": "UserData_jutsuLoadout_idx",
+ "columns": [
+ "jutsuLoadout"
+ ],
+ "isUnique": false
+ },
+ "UserData_level_idx": {
+ "name": "UserData_level_idx",
+ "columns": [
+ "level"
+ ],
+ "isUnique": false
+ },
+ "UserData_username_key": {
+ "name": "UserData_username_key",
+ "columns": [
+ "username"
+ ],
+ "isUnique": true
+ },
+ "UserData_bloodlineId_idx": {
+ "name": "UserData_bloodlineId_idx",
+ "columns": [
+ "bloodlineId"
+ ],
+ "isUnique": false
+ },
+ "UserData_villageId_idx": {
+ "name": "UserData_villageId_idx",
+ "columns": [
+ "villageId"
+ ],
+ "isUnique": false
+ },
+ "UserData_battleId_idx": {
+ "name": "UserData_battleId_idx",
+ "columns": [
+ "battleId"
+ ],
+ "isUnique": false
+ },
+ "UserData_status_idx": {
+ "name": "UserData_status_idx",
+ "columns": [
+ "status"
+ ],
+ "isUnique": false
+ },
+ "UserData_sector_idx": {
+ "name": "UserData_sector_idx",
+ "columns": [
+ "sector"
+ ],
+ "isUnique": false
+ },
+ "UserData_senseiId_idx": {
+ "name": "UserData_senseiId_idx",
+ "columns": [
+ "senseiId"
+ ],
+ "isUnique": false
+ },
+ "UserData_latitude_idx": {
+ "name": "UserData_latitude_idx",
+ "columns": [
+ "latitude"
+ ],
+ "isUnique": false
+ },
+ "UserData_longitude_idx": {
+ "name": "UserData_longitude_idx",
+ "columns": [
+ "longitude"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserData_userId": {
+ "name": "UserData_userId",
+ "columns": [
+ "userId"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserItem": {
+ "name": "UserItem",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "itemId": {
+ "name": "itemId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "equipped": {
+ "name": "equipped",
+ "type": "enum('HEAD','CHEST','LEGS','FEET','HAND_1','HAND_2','ITEM_1','ITEM_2','ITEM_3','ITEM_4','ITEM_5','ITEM_6','ITEM_7','NONE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'NONE'"
+ }
+ },
+ "indexes": {
+ "UserItem_userId_idx": {
+ "name": "UserItem_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "UserItem_itemId_idx": {
+ "name": "UserItem_itemId_idx",
+ "columns": [
+ "itemId"
+ ],
+ "isUnique": false
+ },
+ "UserItem_quantity_idx": {
+ "name": "UserItem_quantity_idx",
+ "columns": [
+ "quantity"
+ ],
+ "isUnique": false
+ },
+ "UserItem_equipped_idx": {
+ "name": "UserItem_equipped_idx",
+ "columns": [
+ "equipped"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserItem_id": {
+ "name": "UserItem_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserJutsu": {
+ "name": "UserJutsu",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jutsuId": {
+ "name": "jutsuId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "level": {
+ "name": "level",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "experience": {
+ "name": "experience",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "equipped": {
+ "name": "equipped",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "finishTraining": {
+ "name": "finishTraining",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "UserJutsu_userId_jutsuId_key": {
+ "name": "UserJutsu_userId_jutsuId_key",
+ "columns": [
+ "userId",
+ "jutsuId"
+ ],
+ "isUnique": true
+ },
+ "UserJutsu_jutsuId_idx": {
+ "name": "UserJutsu_jutsuId_idx",
+ "columns": [
+ "jutsuId"
+ ],
+ "isUnique": false
+ },
+ "Jutsu_equipped_idx": {
+ "name": "Jutsu_equipped_idx",
+ "columns": [
+ "equipped"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserJutsu_id": {
+ "name": "UserJutsu_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserLikes": {
+ "name": "UserLikes",
+ "columns": {
+ "type": {
+ "name": "type",
+ "type": "enum('like','love','laugh')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "imageId": {
+ "name": "imageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "userLikes_userId_idx": {
+ "name": "userLikes_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "userLikes_imageId_idx": {
+ "name": "userLikes_imageId_idx",
+ "columns": [
+ "imageId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {}
+ },
+ "UserNindo": {
+ "name": "UserNindo",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "UserNindo_userId_idx": {
+ "name": "UserNindo_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserNindo_id": {
+ "name": "UserNindo_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserReport": {
+ "name": "UserReport",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reporterUserId": {
+ "name": "reporterUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "reportedUserId": {
+ "name": "reportedUserId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "system": {
+ "name": "system",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "infraction": {
+ "name": "infraction",
+ "type": "json",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reason": {
+ "name": "reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "banEnd": {
+ "name": "banEnd",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "adminResolved": {
+ "name": "adminResolved",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "status": {
+ "name": "status",
+ "type": "enum('UNVIEWED','REPORT_CLEARED','BAN_ACTIVATED','SILENCE_ACTIVATED','BAN_ESCALATED','SILENCE_ESCALATED','OFFICIAL_WARNING')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'UNVIEWED'"
+ }
+ },
+ "indexes": {
+ "UserReport_reporterUserId_idx": {
+ "name": "UserReport_reporterUserId_idx",
+ "columns": [
+ "reporterUserId"
+ ],
+ "isUnique": false
+ },
+ "UserReport_reportedUserId_idx": {
+ "name": "UserReport_reportedUserId_idx",
+ "columns": [
+ "reportedUserId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserReport_id": {
+ "name": "UserReport_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserReportComment": {
+ "name": "UserReportComment",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "userId": {
+ "name": "userId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reportId": {
+ "name": "reportId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "decision": {
+ "name": "decision",
+ "type": "enum('UNVIEWED','REPORT_CLEARED','BAN_ACTIVATED','SILENCE_ACTIVATED','BAN_ESCALATED','SILENCE_ESCALATED','OFFICIAL_WARNING')",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "UserReportComment_userId_idx": {
+ "name": "UserReportComment_userId_idx",
+ "columns": [
+ "userId"
+ ],
+ "isUnique": false
+ },
+ "UserReportComment_reportId_idx": {
+ "name": "UserReportComment_reportId_idx",
+ "columns": [
+ "reportId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserReportComment_id": {
+ "name": "UserReportComment_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "UserRequest": {
+ "name": "UserRequest",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "senderId": {
+ "name": "senderId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "receiverId": {
+ "name": "receiverId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "enum('PENDING','ACCEPTED','REJECTED','CANCELLED','EXPIRED')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('SPAR','ALLIANCE','SURRENDER','SENSEI','ANBU','CLAN','MARRIAGE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ }
+ },
+ "indexes": {
+ "UserRequest_createdAt_idx": {
+ "name": "UserRequest_createdAt_idx",
+ "columns": [
+ "createdAt"
+ ],
+ "isUnique": false
+ },
+ "UserRequest_senderId_idx": {
+ "name": "UserRequest_senderId_idx",
+ "columns": [
+ "senderId"
+ ],
+ "isUnique": false
+ },
+ "UserRequest_receiverId_idx": {
+ "name": "UserRequest_receiverId_idx",
+ "columns": [
+ "receiverId"
+ ],
+ "isUnique": false
+ },
+ "UserRequest_type_idx": {
+ "name": "UserRequest_type_idx",
+ "columns": [
+ "type"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "UserRequest_id": {
+ "name": "UserRequest_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "Village": {
+ "name": "Village",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "mapName": {
+ "name": "mapName",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sector": {
+ "name": "sector",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "kageId": {
+ "name": "kageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tokens": {
+ "name": "tokens",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "type": {
+ "name": "type",
+ "type": "enum('VILLAGE','OUTLAW','SAFEZONE')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'VILLAGE'"
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "leaderUpdatedAt": {
+ "name": "leaderUpdatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP(3))"
+ },
+ "hexColor": {
+ "name": "hexColor",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'#000000'"
+ },
+ "populationCount": {
+ "name": "populationCount",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "allianceSystem": {
+ "name": "allianceSystem",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "joinable": {
+ "name": "joinable",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "pvpDisabled": {
+ "name": "pvpDisabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "villageLogo": {
+ "name": "villageLogo",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "villageGraphic": {
+ "name": "villageGraphic",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ }
+ },
+ "indexes": {
+ "Village_name_key": {
+ "name": "Village_name_key",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ },
+ "Village_sector_key": {
+ "name": "Village_sector_key",
+ "columns": [
+ "sector"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "Village_id": {
+ "name": "Village_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "VillageAlliance": {
+ "name": "VillageAlliance",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "villageIdA": {
+ "name": "villageIdA",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "villageIdB": {
+ "name": "villageIdB",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "enum('NEUTRAL','ALLY','ENEMY')",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updatedAt": {
+ "name": "updatedAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "createdAt": {
+ "name": "createdAt",
+ "type": "datetime(3)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "VillageAlliance_villageIdA_idx": {
+ "name": "VillageAlliance_villageIdA_idx",
+ "columns": [
+ "villageIdA"
+ ],
+ "isUnique": false
+ },
+ "VillageAlliance_villageIdB_idx": {
+ "name": "VillageAlliance_villageIdB_idx",
+ "columns": [
+ "villageIdB"
+ ],
+ "isUnique": false
+ },
+ "VillageAlliance_status_idx": {
+ "name": "VillageAlliance_status_idx",
+ "columns": [
+ "status"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "VillageAlliance_id": {
+ "name": "VillageAlliance_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ },
+ "VillageStructure": {
+ "name": "VillageStructure",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "route": {
+ "name": "route",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "image": {
+ "name": "image",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "villageId": {
+ "name": "villageId",
+ "type": "varchar(191)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "hasPage": {
+ "name": "hasPage",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "curSp": {
+ "name": "curSp",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "maxSp": {
+ "name": "maxSp",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 100
+ },
+ "allyAccess": {
+ "name": "allyAccess",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "baseCost": {
+ "name": "baseCost",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10000
+ },
+ "level": {
+ "name": "level",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "maxLevel": {
+ "name": "maxLevel",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 10
+ },
+ "anbuSquadsPerLvl": {
+ "name": "anbuSquadsPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "arenaRewardPerLvl": {
+ "name": "arenaRewardPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "bankInterestPerLvl": {
+ "name": "bankInterestPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "blackDiscountPerLvl": {
+ "name": "blackDiscountPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "clansPerLvl": {
+ "name": "clansPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "hospitalSpeedupPerLvl": {
+ "name": "hospitalSpeedupPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "itemDiscountPerLvl": {
+ "name": "itemDiscountPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "patrolsPerLvl": {
+ "name": "patrolsPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "ramenDiscountPerLvl": {
+ "name": "ramenDiscountPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "regenIncreasePerLvl": {
+ "name": "regenIncreasePerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sleepRegenPerLvl": {
+ "name": "sleepRegenPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "structureDiscountPerLvl": {
+ "name": "structureDiscountPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "trainBoostPerLvl": {
+ "name": "trainBoostPerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "villageDefencePerLvl": {
+ "name": "villageDefencePerLvl",
+ "type": "tinyint",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "VillageStructure_name_villageId_key": {
+ "name": "VillageStructure_name_villageId_key",
+ "columns": [
+ "name",
+ "villageId"
+ ],
+ "isUnique": true
+ },
+ "VillageStructure_villageId_idx": {
+ "name": "VillageStructure_villageId_idx",
+ "columns": [
+ "villageId"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "VillageStructure_id": {
+ "name": "VillageStructure_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {}
+ }
+ },
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/app/drizzle/migrations/meta/_journal.json b/app/drizzle/migrations/meta/_journal.json
index e8a54f89..a234afa8 100644
--- a/app/drizzle/migrations/meta/_journal.json
+++ b/app/drizzle/migrations/meta/_journal.json
@@ -1107,6 +1107,13 @@
"when": 1729328308678,
"tag": "0157_sad_pete_wisdom",
"breakpoints": true
+ },
+ {
+ "idx": 158,
+ "version": "5",
+ "when": 1729362439597,
+ "tag": "0158_careful_bucky",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/app/drizzle/schema.ts b/app/drizzle/schema.ts
index f0e9748c..b2453bdb 100644
--- a/app/drizzle/schema.ts
+++ b/app/drizzle/schema.ts
@@ -40,6 +40,14 @@ export const gameAsset = mysqlTable(
image: varchar("image", { length: 191 }).notNull(),
frames: tinyint("frames").default(1).notNull(),
speed: tinyint("speed").default(1).notNull(),
+ createdAt: datetime("createdAt", { mode: "date", fsp: 3 })
+ .default(sql`(CURRENT_TIMESTAMP(3))`)
+ .notNull(),
+ updatedAt: datetime("updatedAt", { mode: "date", fsp: 3 })
+ .default(sql`(CURRENT_TIMESTAMP(3))`)
+ .notNull(),
+ licenseDetails: text("licenseDetails").default("TNR").notNull(),
+ createdByUserId: varchar("createdByUserId", { length: 191 }),
onInitialBattleField: boolean("onInitialBattleField").default(false).notNull(),
},
(table) => {
diff --git a/app/public/manual/asset.webp b/app/public/manual/asset.webp
new file mode 100644
index 00000000..b1c11cc7
Binary files /dev/null and b/app/public/manual/asset.webp differ
diff --git a/app/src/app/manual/asset/edit/[assetid]/page.tsx b/app/src/app/manual/asset/edit/[assetid]/page.tsx
new file mode 100644
index 00000000..07e15d71
--- /dev/null
+++ b/app/src/app/manual/asset/edit/[assetid]/page.tsx
@@ -0,0 +1,77 @@
+"use client";
+
+import ContentBox from "@/layout/ContentBox";
+import Loader from "@/layout/Loader";
+import { useRouter } from "next/navigation";
+import { api } from "@/utils/api";
+import { useEffect } from "react";
+import { EditContent } from "@/layout/EditContent";
+import { useRequiredUserData } from "@/utils/UserContext";
+import { canChangeContent } from "@/utils/permissions";
+import { useAssetEditForm } from "@/libs/asset";
+import { gameAssetValidator } from "@/validators/asset";
+import type { GameAsset } from "@/drizzle/schema";
+
+export default function AssetEdit({ params }: { params: { assetid: string } }) {
+ const assetId = params.assetid;
+ const router = useRouter();
+ const { data: userData } = useRequiredUserData();
+
+ // Queries
+ const { data, isPending, refetch } = api.gameAsset.get.useQuery(
+ { id: assetId },
+ { staleTime: Infinity, enabled: assetId !== undefined },
+ );
+
+ // Redirect to profile if not content or admin
+ useEffect(() => {
+ if (userData && !canChangeContent(userData.role)) {
+ router.push("/profile");
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [userData]);
+
+ // Prevent unauthorized access
+ if (isPending || !userData || !canChangeContent(userData.role) || !data) {
+ return Could not find this asset
+ Frames: {item.frames} +
+ )} + {"speed" in item && item.speed && ( ++ Speed: {item.speed} +
+ )} + {"type" in item && item.type && ( ++ Type: {item.type.toLowerCase()} +
+ )} + {"onInitialBattleField" in item && item.onInitialBattleField && ( ++ On battlefield: {item.onInitialBattleField ? "yes" : "no"} +
+ )} + {"licenseDetails" in item && item.licenseDetails && ( ++ License: {item.licenseDetails} +
+ )} {"village" in item && item.village && typeof item.village === "object" && diff --git a/app/src/libs/asset.ts b/app/src/libs/asset.ts new file mode 100644 index 00000000..aebabc83 --- /dev/null +++ b/app/src/libs/asset.ts @@ -0,0 +1,61 @@ +import { calculateContentDiff } from "@/utils/diff"; +import { useForm } from "react-hook-form"; +import { zodResolver } from "@hookform/resolvers/zod"; +import { gameAssetValidator } from "@/validators/asset"; +import { api } from "@/utils/api"; +import { showMutationToast, showFormErrorsToast } from "@/libs/toast"; +import { GameAssetTypes } from "@/drizzle/constants"; +import type { GameAsset } from "@/drizzle/schema"; +import type { FormEntry } from "@/layout/EditContent"; +import type { ZodGameAssetType } from "@/validators/asset"; + +/** + * Hook used when creating frontend forms for editing assets + * @param data + */ +export const useAssetEditForm = (asset: GameAsset, refetch: () => void) => { + // Form handling + const form = useForm