generator client { provider = "prisma-client" output = "../lib/generated/prisma" } datasource db { provider = "mysql" } model active_app { ActiveAppID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt AppID Int @db.UnsignedInt maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "active_app_ibfk_1") app app @relation(fields: [AppID], references: [AppID], onUpdate: Restrict, map: "active_app_ibfk_2") @@index([AppID], map: "AppID") @@index([MaestroID], map: "MaestroID") } model admin { AdminID Int @id @default(autoincrement()) @db.UnsignedInt Name String @db.Char(50) Password String @db.Char(50) Email String @db.Char(50) AccountType Int @db.UnsignedInt ActivateStatus Int @db.UnsignedInt } model ads_client { AdsClientID Int @id @default(autoincrement()) @db.UnsignedInt ClientName String @db.Char(50) typing_exam_ads typing_exam_ads[] } model app { AppID Int @id @default(autoincrement()) @db.UnsignedInt AppName String @db.Char(40) KoreanName String @db.Char(40) AppType Int @db.UnsignedInt Status Int @db.UnsignedInt HowToPlay String @db.Text active_app active_app[] app_highest_record app_highest_record[] best_record best_record[] } model app_highest_record { AppHighestRecordID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt AppID Int @db.UnsignedInt PlayerID Int @db.UnsignedInt HighestRecord Float @db.Float RecordDateTime DateTime @db.DateTime(0) maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "app_highest_record_ibfk_1") app app @relation(fields: [AppID], references: [AppID], onUpdate: Restrict, map: "app_highest_record_ibfk_2") player player @relation(fields: [PlayerID], references: [PlayerID], onUpdate: Restrict, map: "app_highest_record_ibfk_3") @@index([AppID], map: "AppID") @@index([MaestroID], map: "MaestroID") @@index([PlayerID], map: "PlayerID") } model banned_word { BannedWordID Int @id @default(autoincrement()) @db.UnsignedInt Word String @db.Char(50) } model best_record { BestRecordID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt AppID Int @db.UnsignedInt PlayerID Int @db.UnsignedInt BestRecord Float @db.Float RecordDateTime DateTime @db.DateTime(0) maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "best_record_ibfk_1") app app @relation(fields: [AppID], references: [AppID], onUpdate: Restrict, map: "best_record_ibfk_2") player player @relation(fields: [PlayerID], references: [PlayerID], onUpdate: Restrict, map: "best_record_ibfk_3") @@index([AppID], map: "AppID") @@index([MaestroID], map: "MaestroID") @@index([PlayerID], map: "PlayerID") } model license_maestro_password { LicenseMaestroPasswordID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt Password Int @db.UnsignedInt maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "license_maestro_password_ibfk_1") @@index([MaestroID], map: "MaestroID") } model license_score { LicenseScoreID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt PlayerID Int @db.UnsignedInt SubjectName String @db.Char(50) Score Int @db.UnsignedInt ScoreDateTime DateTime @db.DateTime(0) maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "license_score_ibfk_1") player player @relation(fields: [PlayerID], references: [PlayerID], onUpdate: Restrict, map: "license_score_ibfk_2") @@index([MaestroID], map: "MaestroID") @@index([PlayerID], map: "PlayerID") } model license_time { LicenseTimeID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt PlayerID Int @db.UnsignedInt StartTime Int @db.UnsignedInt LeftTime Int SavedDateTime DateTime @db.DateTime(0) SubjectName String @db.Char(50) maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "license_time_ibfk_1") player player @relation(fields: [PlayerID], references: [PlayerID], onUpdate: Restrict, map: "license_time_ibfk_2") @@index([MaestroID], map: "MaestroID") @@index([PlayerID], map: "PlayerID") } /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model maestro { MaestroID Int @id @default(autoincrement()) @db.UnsignedInt Name String @db.Char(50) Password String @db.Char(50) Email String @db.Char(50) AccountType Int @db.UnsignedInt ActivateStatus Int @db.UnsignedInt AvailableActivateDateTime DateTime @db.DateTime(0) PlayerCount Int @db.UnsignedInt AcceptClausesDateTime DateTime @db.DateTime(0) AllowEditEnterCode Int @db.UnsignedInt MaestroTestID Int? @db.UnsignedInt active_app active_app[] app_highest_record app_highest_record[] best_record best_record[] license_maestro_password license_maestro_password[] license_score license_score[] license_time license_time[] maestro_extension maestro_extension[] maestro_upgrade maestro_upgrade[] player player[] typing_exam_record typing_exam_record[] } /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model maestro_extension { MaestroExtensionID Int @id @default(autoincrement()) @db.UnsignedInt AccountType Int @db.UnsignedInt RequestedDateTime DateTime @db.DateTime(0) Status Int @db.UnsignedInt MaestroID Int @db.UnsignedInt maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "maestro_extension_ibfk_1") @@index([MaestroID], map: "MaestroID") } model maestro_log { MaestroLogID Int @id @default(autoincrement()) @db.UnsignedInt Type String @db.Char(50) MaestroID Int @db.UnsignedInt LogDateTime DateTime @db.DateTime(0) Remark String @db.Char(100) } /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model maestro_upgrade { MaestroUpgradeID Int @id @default(autoincrement()) @db.UnsignedInt RegisteredActivateStatus Int @default(1) @db.UnsignedInt RegisteredAccountType Int RequestedAccountType Int @db.UnsignedInt RequestedDateTime DateTime @db.DateTime(0) Status Int @db.UnsignedInt MaestroID Int @db.UnsignedInt maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "maestro_upgrade_ibfk_1") @@index([MaestroID], map: "MaestroID") } model player { PlayerID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt Name String @db.Char(50) EnterCode String @db.Char(8) AccountType Int? @default(0) @db.UnsignedInt app_highest_record app_highest_record[] best_record best_record[] license_score license_score[] license_time license_time[] maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "player_ibfk_1") typing_exam_record typing_exam_record[] @@index([MaestroID], map: "MaestroID") } model typing_exam_ads { TypingExamAdsID Int @id @default(autoincrement()) @db.UnsignedInt AdsClientID Int @db.UnsignedInt WritingID Int @db.UnsignedInt FromDateTime DateTime @db.DateTime(0) ToDateTime DateTime @db.DateTime(0) Status Int @db.UnsignedInt Cost Float @db.Float ads_client ads_client @relation(fields: [AdsClientID], references: [AdsClientID], onUpdate: Restrict, map: "typing_exam_ads_ibfk_1") writing writing @relation(fields: [WritingID], references: [WritingID], onUpdate: Restrict, map: "typing_exam_ads_ibfk_2") @@index([AdsClientID], map: "AdsClientID") @@index([WritingID], map: "WritingID") } model typing_exam_highest_record { TypingExamHighestRecordID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt PlayerID Int @db.UnsignedInt WritingID Int @db.UnsignedInt HighestRecord Float @db.Float RecordDateTime DateTime @db.DateTime(0) @@index([MaestroID], map: "MaestroID") @@index([PlayerID], map: "PlayerID") @@index([WritingID], map: "WritingID") } model typing_exam_record { TypingExamRecordID Int @id @default(autoincrement()) @db.UnsignedInt MaestroID Int @db.UnsignedInt PlayerID Int @db.UnsignedInt WritingID Int @db.UnsignedInt Record Float @db.Float RecordDateTime DateTime @db.DateTime(0) maestro maestro @relation(fields: [MaestroID], references: [MaestroID], onUpdate: Restrict, map: "typing_exam_record_ibfk_1") player player @relation(fields: [PlayerID], references: [PlayerID], onUpdate: Restrict, map: "typing_exam_record_ibfk_2") writing writing @relation(fields: [WritingID], references: [WritingID], onUpdate: Restrict, map: "typing_exam_record_ibfk_3") @@index([MaestroID], map: "MaestroID") @@index([PlayerID], map: "PlayerID") @@index([WritingID], map: "WritingID") } model writing { WritingID Int @id @default(autoincrement()) @db.UnsignedInt ActivateStatus Int Language String @db.Char(10) Name String @db.Char(50) Filename String @db.Char(50) Writer String @db.Char(50) WriterID Int? @db.UnsignedInt UpdateDate DateTime @db.DateTime(0) LetterCount Int @db.UnsignedInt typing_exam_ads typing_exam_ads[] typing_exam_record typing_exam_record[] }