26 lines
649 B
TypeScript
26 lines
649 B
TypeScript
import { Prisma } from '@prisma/client';
|
|
export class RawItemUsePrefab {
|
|
id: number
|
|
path: string
|
|
rcid: string
|
|
|
|
static fromRawData(data: any): RawItemUsePrefab {
|
|
const rawData = new RawItemUsePrefab();
|
|
Object.assign(rawData, data)
|
|
return rawData
|
|
}
|
|
|
|
toItemUsePrefabData(): Prisma.ItemUsePrefabCreateNestedOneWithoutItemPropInput {
|
|
return {
|
|
connectOrCreate: {
|
|
where: {
|
|
id: this.id
|
|
},
|
|
create: {
|
|
path: this.path,
|
|
rcid: this.rcid
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |