2 Replies
Hi @DevPanda
Can you please share the schema and query you are performing?
model Character {
id String @id @default(auto()) @map("_id") @db.ObjectId
accountId String @db.ObjectId
inGame Boolean @default(false)
isActive Boolean @default(true)
inActiveReason String?
firstName String
lastName String
birthdate String
dimension Int @default(0)
playtime Int @default(0)
lastPosition Json?
lastRotation Json?
hasTutorialFinished Boolean @default(false)
health Int @default(1000)
armour Int @default(0)
food Int @default(100)
drink Int @default(100)
mana Int @default(100)
isDeath Boolean @default(false)
isPermaDeath Boolean @default(false)
permaDeathDate DateTime?
permaDeathReason String?
gender String?
/// [HeadBlendData]
headBlendData Json?
faceFeatures Json[] @default([])
headOverlays Json[] @default([])
clothes Json[] @default([])
props Json[] @default([])
hairColor Int @default(0)
hairHighlightColor Int @default(0)
eyeColor Int @default(0)
decorations Json[] @default([])
charCreatorDone Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
callNumbers CharacterCallNumber[]
account Account @relation(fields: [accountId], references: [id])
@@unique([firstName, lastName])
@@map("characters")
}
model Character {
id String @id @default(auto()) @map("_id") @db.ObjectId
accountId String @db.ObjectId
inGame Boolean @default(false)
isActive Boolean @default(true)
inActiveReason String?
firstName String
lastName String
birthdate String
dimension Int @default(0)
playtime Int @default(0)
lastPosition Json?
lastRotation Json?
hasTutorialFinished Boolean @default(false)
health Int @default(1000)
armour Int @default(0)
food Int @default(100)
drink Int @default(100)
mana Int @default(100)
isDeath Boolean @default(false)
isPermaDeath Boolean @default(false)
permaDeathDate DateTime?
permaDeathReason String?
gender String?
/// [HeadBlendData]
headBlendData Json?
faceFeatures Json[] @default([])
headOverlays Json[] @default([])
clothes Json[] @default([])
props Json[] @default([])
hairColor Int @default(0)
hairHighlightColor Int @default(0)
eyeColor Int @default(0)
decorations Json[] @default([])
charCreatorDone Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
callNumbers CharacterCallNumber[]
account Account @relation(fields: [accountId], references: [id])
@@unique([firstName, lastName])
@@map("characters")
}
const char = await DBService.db.character.create({
data: {
...charData,
accountId: player.accountId,
charCreatorDone: true
}
})
const char = await DBService.db.character.create({
data: {
...charData,
accountId: player.accountId,
charCreatorDone: true
}
})