feat: submitting and validation

custom images of the mii are still not implemented
This commit is contained in:
trafficlunar 2025-04-05 14:45:22 +01:00
parent fb4d790b3d
commit 49c6206623
14 changed files with 514 additions and 63 deletions

View file

@ -1,9 +0,0 @@
/*
Warnings:
- You are about to drop the column `pictures` on the `miis` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "miis" DROP COLUMN "pictures",
ADD COLUMN "images" TEXT[];

View file

@ -45,7 +45,9 @@ CREATE TABLE "miis" (
"id" SERIAL NOT NULL,
"userId" INTEGER NOT NULL,
"name" VARCHAR(64) NOT NULL,
"pictures" TEXT[],
"qrCodeUrl" TEXT NOT NULL,
"studioUrl" TEXT NOT NULL,
"images" TEXT[],
"tags" TEXT[],
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

View file

@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "miis" ALTER COLUMN "qrCodeUrl" DROP NOT NULL,
ALTER COLUMN "studioUrl" DROP NOT NULL;

View file

@ -61,11 +61,13 @@ model Session {
}
model Mii {
id Int @id @default(autoincrement())
userId Int
name String @db.VarChar(64)
images String[]
tags String[]
id Int @id @default(autoincrement())
userId Int
name String @db.VarChar(64)
qrCodeUrl String?
studioUrl String?
images String[]
tags String[]
createdAt DateTime @default(now())