Updated tiles logics

This commit is contained in:
2024-07-11 19:52:44 +02:00
parent 8682ce01cd
commit c290443742
10 changed files with 114 additions and 86 deletions

View File

@ -0,0 +1,19 @@
/*
Warnings:
- You are about to drop the `TileTag` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropTable
DROP TABLE `TileTag`;
-- CreateTable
CREATE TABLE `Tile` (
`id` VARCHAR(191) NOT NULL,
`name` VARCHAR(191) NOT NULL,
`tags` JSON NOT NULL,
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updatedAt` DATETIME(3) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

View File

@ -19,6 +19,14 @@ datasource db {
url = env("DATABASE_URL")
}
model Tile {
id String @id @default(uuid())
name String
tags Json
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Object {
id String @id @default(uuid())
name String
@ -74,11 +82,6 @@ model CharacterItem {
quantity Int
}
model TileTag {
tile String @id
tags Json
}
model Zone {
id Int @id @default(autoincrement())
name String