import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';
import { ObjectType, Field, ID } from '@nestjs/graphql';

@ObjectType()
@Schema({ timestamps: true })
export class UserType {
    @Field()
    @Prop({ required: true })
    type: string;

    @Field()
    @Prop({ required: true })
    token: string;

    @Field()
    @Prop({ required: true })
    typeToken: string;

    @Field()
    @Prop({ required: true })
    description: string;
}

export type UserTypeDocument = UserType & Document;
export const UserTypeSchema = SchemaFactory.createForClass(UserType);
