Add prisma:generate script to package.json
This commit is contained in:
51
src/types/user.type.ts
Normal file
51
src/types/user.type.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import { ObjectType, Field, Int } from '@nestjs/graphql';
|
||||
import {
|
||||
User as PrismaUser,
|
||||
Role,
|
||||
Order,
|
||||
UploadedDocument,
|
||||
Chat,
|
||||
Feedback,
|
||||
} from '@prisma/client';
|
||||
|
||||
@ObjectType()
|
||||
export class User implements PrismaUser {
|
||||
@Field(() => Int)
|
||||
id: string;
|
||||
|
||||
@Field()
|
||||
name: string;
|
||||
|
||||
@Field()
|
||||
email: string;
|
||||
|
||||
@Field()
|
||||
password: string;
|
||||
|
||||
@Field()
|
||||
phoneNumber: string;
|
||||
|
||||
@Field()
|
||||
oauthToken: string | null;
|
||||
|
||||
@Field()
|
||||
role: Role;
|
||||
|
||||
@Field()
|
||||
createdAt: Date;
|
||||
|
||||
@Field()
|
||||
updatedAt: Date;
|
||||
|
||||
@Field()
|
||||
orders: Order[];
|
||||
|
||||
@Field()
|
||||
feedbacks: Feedback[];
|
||||
|
||||
@Field()
|
||||
chats: Chat[];
|
||||
|
||||
@Field()
|
||||
documents: UploadedDocument[];
|
||||
}
|
||||
Reference in New Issue
Block a user