Files
twenty_crm/server/src/api/local-graphql/models/User.ts
Sammy Teillet fecf45f3bc Sammy/t 245 implement resolvers matching hasura (#139)
* chore: remove old resolvers

* refactor: move generated file in code base

* feature: use only necessary code in graphql

* feature: implement query companies

* feature: implement companies and relations

* feature: implement all companies resolvers

* feature: implement all people resolver

* feature: add use resolvers

* feature: implement resolvers for workspace and users
2023-05-25 17:10:00 +02:00

95 lines
1.9 KiB
TypeScript

import * as TypeGraphQL from '@nestjs/graphql';
import * as GraphQLScalars from 'graphql-scalars';
import { Prisma } from '@prisma/client';
import { DecimalJSScalar } from '../scalars';
import { Company } from './Company';
import { RefreshToken } from './RefreshToken';
import { WorkspaceMember } from './WorkspaceMember';
import { UserCount } from '../resolvers/outputs/UserCount';
@TypeGraphQL.ObjectType('User', {
isAbstract: true,
})
export class User {
@TypeGraphQL.Field((_type) => String, {
nullable: false,
})
id!: string;
@TypeGraphQL.Field((_type) => Date, {
nullable: false,
})
createdAt!: Date;
@TypeGraphQL.Field((_type) => Date, {
nullable: false,
})
updatedAt!: Date;
@TypeGraphQL.Field((_type) => Date, {
nullable: true,
})
deletedAt?: Date | null;
@TypeGraphQL.Field((_type) => Date, {
nullable: true,
})
lastSeen?: Date | null;
@TypeGraphQL.Field((_type) => Boolean, {
nullable: false,
})
disabled!: boolean;
@TypeGraphQL.Field((_type) => String, {
nullable: false,
})
displayName!: string;
@TypeGraphQL.Field((_type) => String, {
nullable: false,
})
email!: string;
@TypeGraphQL.Field((_type) => String, {
nullable: true,
})
avatarUrl?: string | null;
@TypeGraphQL.Field((_type) => String, {
nullable: false,
})
locale!: string;
@TypeGraphQL.Field((_type) => String, {
nullable: true,
})
phoneNumber?: string | null;
@TypeGraphQL.Field((_type) => String, {
nullable: true,
})
passwordHash?: string | null;
@TypeGraphQL.Field((_type) => Boolean, {
nullable: false,
})
emailVerified!: boolean;
@TypeGraphQL.Field((_type) => GraphQLScalars.JSONResolver, {
nullable: true,
})
metadata?: Prisma.JsonValue | null;
WorkspaceMember?: WorkspaceMember | null;
companies?: Company[];
RefreshTokens?: RefreshToken[];
@TypeGraphQL.Field((_type) => UserCount, {
nullable: true,
})
_count?: UserCount | null;
}