mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 04:20:07 +02:00
Add isSuperAdmin account
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "User" ADD COLUMN "isSuperAdmin" BOOLEAN NOT NULL DEFAULT false;
|
||||
@@ -57,15 +57,16 @@ model RefreshToken {
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
||||
displayName String? @unique
|
||||
username String @unique
|
||||
password String
|
||||
enabled Boolean @default(false)
|
||||
isAdmin Boolean @default(false)
|
||||
deviceId String @unique
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
|
||||
displayName String? @unique
|
||||
username String @unique
|
||||
password String
|
||||
enabled Boolean @default(false)
|
||||
isAdmin Boolean @default(false)
|
||||
isSuperAdmin Boolean @default(false)
|
||||
deviceId String @unique
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
histories History[]
|
||||
albumArtistRatings AlbumArtistRating[]
|
||||
|
||||
@@ -15,6 +15,7 @@ async function main() {
|
||||
deviceId: `admin_${randomString(10)}`,
|
||||
enabled: true,
|
||||
isAdmin: true,
|
||||
isSuperAdmin: true,
|
||||
password: hashedPassword,
|
||||
username: 'admin',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user