fix: add firstName and lastName to user model (#473)

* fix: add firstname and lastanme to user model

* fix: avoid undefined in displayName resolve field

* fix: user firstName and lastName instead of firstname lastname

* fix: person table proper naming firstName lastName

* fix: migrate front with firstName and lastName

* fix: make front-graphql-generate not working
This commit is contained in:
Jérémy M
2023-06-29 17:11:15 +02:00
committed by GitHub
parent d9af205ccb
commit 097b278b11
100 changed files with 606 additions and 329 deletions

View File

@ -56,7 +56,6 @@ export type Comment = {
commentThread: CommentThread;
commentThreadId: Scalars['String'];
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
id: Scalars['ID'];
updatedAt: Scalars['DateTime'];
};
@ -66,7 +65,6 @@ export type CommentCreateInput = {
body: Scalars['String'];
commentThread: CommentThreadCreateNestedOneWithoutCommentsInput;
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
@ -75,7 +73,6 @@ export type CommentCreateManyCommentThreadInput = {
authorId: Scalars['String'];
body: Scalars['String'];
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
@ -98,7 +95,6 @@ export type CommentCreateWithoutCommentThreadInput = {
author: UserCreateNestedOneWithoutCommentsInput;
body: Scalars['String'];
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
@ -121,7 +117,6 @@ export type CommentScalarWhereInput = {
body?: InputMaybe<StringFilter>;
commentThreadId?: InputMaybe<StringFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
updatedAt?: InputMaybe<DateTimeFilter>;
};
@ -131,7 +126,6 @@ export type CommentThread = {
commentThreadTargets?: Maybe<Array<CommentThreadTarget>>;
comments?: Maybe<Array<Comment>>;
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
id: Scalars['ID'];
updatedAt: Scalars['DateTime'];
};
@ -140,7 +134,6 @@ export type CommentThreadCreateInput = {
commentThreadTargets?: InputMaybe<CommentThreadTargetCreateNestedManyWithoutCommentThreadInput>;
comments?: InputMaybe<CommentCreateNestedManyWithoutCommentThreadInput>;
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
@ -153,7 +146,6 @@ export type CommentThreadOrderByWithRelationInput = {
commentThreadTargets?: InputMaybe<CommentThreadTargetOrderByRelationAggregateInput>;
comments?: InputMaybe<CommentOrderByRelationAggregateInput>;
createdAt?: InputMaybe<SortOrder>;
deletedAt?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
updatedAt?: InputMaybe<SortOrder>;
};
@ -178,7 +170,6 @@ export type CommentThreadTarget = {
commentableId: Scalars['String'];
commentableType: CommentableType;
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
id: Scalars['ID'];
updatedAt: Scalars['DateTime'];
};
@ -187,7 +178,6 @@ export type CommentThreadTargetCreateManyCommentThreadInput = {
commentableId: Scalars['String'];
commentableType: CommentableType;
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
@ -210,7 +200,6 @@ export type CommentThreadTargetCreateWithoutCommentThreadInput = {
commentableId: Scalars['String'];
commentableType: CommentableType;
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
@ -233,7 +222,6 @@ export type CommentThreadTargetScalarWhereInput = {
commentableId?: InputMaybe<StringFilter>;
commentableType?: InputMaybe<EnumCommentableTypeFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
updatedAt?: InputMaybe<DateTimeFilter>;
};
@ -242,7 +230,6 @@ export type CommentThreadTargetUpdateManyMutationInput = {
commentableId?: InputMaybe<StringFieldUpdateOperationsInput>;
commentableType?: InputMaybe<EnumCommentableTypeFieldUpdateOperationsInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
};
@ -275,7 +262,6 @@ export type CommentThreadTargetUpdateWithoutCommentThreadInput = {
commentableId?: InputMaybe<StringFieldUpdateOperationsInput>;
commentableType?: InputMaybe<EnumCommentableTypeFieldUpdateOperationsInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
};
@ -295,7 +281,6 @@ export type CommentThreadTargetWhereInput = {
commentableId?: InputMaybe<StringFilter>;
commentableType?: InputMaybe<EnumCommentableTypeFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
updatedAt?: InputMaybe<DateTimeFilter>;
};
@ -308,7 +293,6 @@ export type CommentThreadUpdateInput = {
commentThreadTargets?: InputMaybe<CommentThreadTargetUpdateManyWithoutCommentThreadNestedInput>;
comments?: InputMaybe<CommentUpdateManyWithoutCommentThreadNestedInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
};
@ -320,7 +304,6 @@ export type CommentThreadWhereInput = {
commentThreadTargets?: InputMaybe<CommentThreadTargetListRelationFilter>;
comments?: InputMaybe<CommentListRelationFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
updatedAt?: InputMaybe<DateTimeFilter>;
};
@ -332,7 +315,6 @@ export type CommentThreadWhereUniqueInput = {
export type CommentUpdateManyMutationInput = {
body?: InputMaybe<StringFieldUpdateOperationsInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
};
@ -365,7 +347,6 @@ export type CommentUpdateWithoutCommentThreadInput = {
author?: InputMaybe<UserUpdateOneRequiredWithoutCommentsNestedInput>;
body?: InputMaybe<StringFieldUpdateOperationsInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
};
@ -386,7 +367,6 @@ export type CommentWhereInput = {
commentThread?: InputMaybe<CommentThreadRelationFilter>;
commentThreadId?: InputMaybe<StringFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
updatedAt?: InputMaybe<DateTimeFilter>;
};
@ -409,7 +389,6 @@ export type Company = {
commentThreads: Array<CommentThread>;
comments: Array<Comment>;
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
domainName: Scalars['String'];
employees?: Maybe<Scalars['Int']>;
id: Scalars['ID'];
@ -422,7 +401,6 @@ export type CompanyCreateInput = {
accountOwner?: InputMaybe<UserCreateNestedOneWithoutCompaniesInput>;
address: Scalars['String'];
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
domainName: Scalars['String'];
employees?: InputMaybe<Scalars['Int']>;
id?: InputMaybe<Scalars['String']>;
@ -434,7 +412,6 @@ export type CompanyCreateInput = {
export type CompanyCreateManyAccountOwnerInput = {
address: Scalars['String'];
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
domainName: Scalars['String'];
employees?: InputMaybe<Scalars['Int']>;
id?: InputMaybe<Scalars['String']>;
@ -466,7 +443,6 @@ export type CompanyCreateOrConnectWithoutAccountOwnerInput = {
export type CompanyCreateWithoutAccountOwnerInput = {
address: Scalars['String'];
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
domainName: Scalars['String'];
employees?: InputMaybe<Scalars['Int']>;
id?: InputMaybe<Scalars['String']>;
@ -490,7 +466,6 @@ export type CompanyOrderByWithRelationInput = {
accountOwnerId?: InputMaybe<SortOrder>;
address?: InputMaybe<SortOrder>;
createdAt?: InputMaybe<SortOrder>;
deletedAt?: InputMaybe<SortOrder>;
domainName?: InputMaybe<SortOrder>;
employees?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
@ -524,7 +499,6 @@ export type CompanyScalarWhereInput = {
accountOwnerId?: InputMaybe<StringNullableFilter>;
address?: InputMaybe<StringFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
domainName?: InputMaybe<StringFilter>;
employees?: InputMaybe<IntNullableFilter>;
id?: InputMaybe<StringFilter>;
@ -536,7 +510,6 @@ export type CompanyUpdateInput = {
accountOwner?: InputMaybe<UserUpdateOneWithoutCompaniesNestedInput>;
address?: InputMaybe<StringFieldUpdateOperationsInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
domainName?: InputMaybe<StringFieldUpdateOperationsInput>;
employees?: InputMaybe<NullableIntFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
@ -548,7 +521,6 @@ export type CompanyUpdateInput = {
export type CompanyUpdateManyMutationInput = {
address?: InputMaybe<StringFieldUpdateOperationsInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
domainName?: InputMaybe<StringFieldUpdateOperationsInput>;
employees?: InputMaybe<NullableIntFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
@ -587,7 +559,6 @@ export type CompanyUpdateWithWhereUniqueWithoutAccountOwnerInput = {
export type CompanyUpdateWithoutAccountOwnerInput = {
address?: InputMaybe<StringFieldUpdateOperationsInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
domainName?: InputMaybe<StringFieldUpdateOperationsInput>;
employees?: InputMaybe<NullableIntFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
@ -610,7 +581,6 @@ export type CompanyWhereInput = {
accountOwnerId?: InputMaybe<StringNullableFilter>;
address?: InputMaybe<StringFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
domainName?: InputMaybe<StringFilter>;
employees?: InputMaybe<IntNullableFilter>;
id?: InputMaybe<StringFilter>;
@ -913,11 +883,10 @@ export type Person = {
company?: Maybe<Company>;
companyId?: Maybe<Scalars['String']>;
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
email: Scalars['String'];
firstname: Scalars['String'];
firstName: Scalars['String'];
id: Scalars['ID'];
lastname: Scalars['String'];
lastName: Scalars['String'];
phone: Scalars['String'];
updatedAt: Scalars['DateTime'];
};
@ -926,11 +895,10 @@ export type PersonCreateInput = {
city: Scalars['String'];
company?: InputMaybe<CompanyCreateNestedOneWithoutPeopleInput>;
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
email: Scalars['String'];
firstname: Scalars['String'];
firstName: Scalars['String'];
id?: InputMaybe<Scalars['String']>;
lastname: Scalars['String'];
lastName: Scalars['String'];
phone: Scalars['String'];
updatedAt?: InputMaybe<Scalars['DateTime']>;
};
@ -954,11 +922,10 @@ export type PersonOrderByWithRelationInput = {
company?: InputMaybe<CompanyOrderByWithRelationInput>;
companyId?: InputMaybe<SortOrder>;
createdAt?: InputMaybe<SortOrder>;
deletedAt?: InputMaybe<SortOrder>;
email?: InputMaybe<SortOrder>;
firstname?: InputMaybe<SortOrder>;
firstName?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
lastname?: InputMaybe<SortOrder>;
lastName?: InputMaybe<SortOrder>;
phone?: InputMaybe<SortOrder>;
updatedAt?: InputMaybe<SortOrder>;
};
@ -969,9 +936,9 @@ export enum PersonScalarFieldEnum {
CreatedAt = 'createdAt',
DeletedAt = 'deletedAt',
Email = 'email',
Firstname = 'firstname',
FirstName = 'firstName',
Id = 'id',
Lastname = 'lastname',
LastName = 'lastName',
Phone = 'phone',
UpdatedAt = 'updatedAt',
WorkspaceId = 'workspaceId'
@ -981,11 +948,10 @@ export type PersonUpdateInput = {
city?: InputMaybe<StringFieldUpdateOperationsInput>;
company?: InputMaybe<CompanyUpdateOneWithoutPeopleNestedInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
email?: InputMaybe<StringFieldUpdateOperationsInput>;
firstname?: InputMaybe<StringFieldUpdateOperationsInput>;
firstName?: InputMaybe<StringFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
lastname?: InputMaybe<StringFieldUpdateOperationsInput>;
lastName?: InputMaybe<StringFieldUpdateOperationsInput>;
phone?: InputMaybe<StringFieldUpdateOperationsInput>;
updatedAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
};
@ -1002,11 +968,10 @@ export type PersonWhereInput = {
company?: InputMaybe<CompanyRelationFilter>;
companyId?: InputMaybe<StringNullableFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
email?: InputMaybe<StringFilter>;
firstname?: InputMaybe<StringFilter>;
firstName?: InputMaybe<StringFilter>;
id?: InputMaybe<StringFilter>;
lastname?: InputMaybe<StringFilter>;
lastName?: InputMaybe<StringFilter>;
phone?: InputMaybe<StringFilter>;
updatedAt?: InputMaybe<DateTimeFilter>;
};
@ -1018,7 +983,6 @@ export type PersonWhereUniqueInput = {
export type Pipeline = {
__typename?: 'Pipeline';
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
icon: Scalars['String'];
id: Scalars['ID'];
name: Scalars['String'];
@ -1034,7 +998,6 @@ export type PipelineCreateNestedOneWithoutPipelineProgressesInput = {
export type PipelineOrderByWithRelationInput = {
createdAt?: InputMaybe<SortOrder>;
deletedAt?: InputMaybe<SortOrder>;
icon?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
name?: InputMaybe<SortOrder>;
@ -1047,7 +1010,6 @@ export type PipelineOrderByWithRelationInput = {
export type PipelineProgress = {
__typename?: 'PipelineProgress';
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
id: Scalars['ID'];
pipeline: Pipeline;
pipelineId: Scalars['String'];
@ -1060,7 +1022,6 @@ export type PipelineProgress = {
export type PipelineProgressCreateInput = {
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
id?: InputMaybe<Scalars['String']>;
pipeline: PipelineCreateNestedOneWithoutPipelineProgressesInput;
pipelineStage: PipelineStageCreateNestedOneWithoutPipelineProgressesInput;
@ -1081,7 +1042,6 @@ export type PipelineProgressOrderByRelationAggregateInput = {
export type PipelineProgressOrderByWithRelationInput = {
createdAt?: InputMaybe<SortOrder>;
deletedAt?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
pipeline?: InputMaybe<PipelineOrderByWithRelationInput>;
pipelineId?: InputMaybe<SortOrder>;
@ -1106,7 +1066,6 @@ export enum PipelineProgressScalarFieldEnum {
export type PipelineProgressUpdateInput = {
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
pipeline?: InputMaybe<PipelineUpdateOneRequiredWithoutPipelineProgressesNestedInput>;
pipelineStage?: InputMaybe<PipelineStageUpdateOneRequiredWithoutPipelineProgressesNestedInput>;
@ -1120,7 +1079,6 @@ export type PipelineProgressWhereInput = {
NOT?: InputMaybe<Array<PipelineProgressWhereInput>>;
OR?: InputMaybe<Array<PipelineProgressWhereInput>>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
pipeline?: InputMaybe<PipelineRelationFilter>;
pipelineId?: InputMaybe<StringFilter>;
@ -1160,7 +1118,6 @@ export type PipelineStage = {
__typename?: 'PipelineStage';
color: Scalars['String'];
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
id: Scalars['ID'];
name: Scalars['String'];
pipeline: Pipeline;
@ -1187,7 +1144,6 @@ export type PipelineStageOrderByRelationAggregateInput = {
export type PipelineStageOrderByWithRelationInput = {
color?: InputMaybe<SortOrder>;
createdAt?: InputMaybe<SortOrder>;
deletedAt?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
name?: InputMaybe<SortOrder>;
pipeline?: InputMaybe<PipelineOrderByWithRelationInput>;
@ -1224,7 +1180,6 @@ export type PipelineStageWhereInput = {
OR?: InputMaybe<Array<PipelineStageWhereInput>>;
color?: InputMaybe<StringFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
id?: InputMaybe<StringFilter>;
name?: InputMaybe<StringFilter>;
pipeline?: InputMaybe<PipelineRelationFilter>;
@ -1247,7 +1202,6 @@ export type PipelineWhereInput = {
NOT?: InputMaybe<Array<PipelineWhereInput>>;
OR?: InputMaybe<Array<PipelineWhereInput>>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
icon?: InputMaybe<StringFilter>;
id?: InputMaybe<StringFilter>;
name?: InputMaybe<StringFilter>;
@ -1392,12 +1346,13 @@ export type User = {
comments?: Maybe<Array<Comment>>;
companies?: Maybe<Array<Company>>;
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
disabled: Scalars['Boolean'];
displayName: Scalars['String'];
email: Scalars['String'];
emailVerified: Scalars['Boolean'];
firstName: Scalars['String'];
id: Scalars['ID'];
lastName: Scalars['String'];
lastSeen?: Maybe<Scalars['DateTime']>;
locale: Scalars['String'];
metadata?: Maybe<Scalars['JSON']>;
@ -1423,12 +1378,13 @@ export type UserCreateWithoutCommentsInput = {
avatarUrl?: InputMaybe<Scalars['String']>;
companies?: InputMaybe<CompanyCreateNestedManyWithoutAccountOwnerInput>;
createdAt?: InputMaybe<Scalars['DateTime']>;
deletedAt?: InputMaybe<Scalars['DateTime']>;
disabled?: InputMaybe<Scalars['Boolean']>;
displayName: Scalars['String'];
displayName?: InputMaybe<Scalars['String']>;
email: Scalars['String'];
emailVerified?: InputMaybe<Scalars['Boolean']>;
firstName: Scalars['String'];
id?: InputMaybe<Scalars['String']>;
lastName: Scalars['String'];
lastSeen?: InputMaybe<Scalars['DateTime']>;
locale: Scalars['String'];
metadata?: InputMaybe<Scalars['JSON']>;
@ -1441,12 +1397,13 @@ export type UserOrderByWithRelationInput = {
comments?: InputMaybe<CommentOrderByRelationAggregateInput>;
companies?: InputMaybe<CompanyOrderByRelationAggregateInput>;
createdAt?: InputMaybe<SortOrder>;
deletedAt?: InputMaybe<SortOrder>;
disabled?: InputMaybe<SortOrder>;
displayName?: InputMaybe<SortOrder>;
email?: InputMaybe<SortOrder>;
emailVerified?: InputMaybe<SortOrder>;
firstName?: InputMaybe<SortOrder>;
id?: InputMaybe<SortOrder>;
lastName?: InputMaybe<SortOrder>;
lastSeen?: InputMaybe<SortOrder>;
locale?: InputMaybe<SortOrder>;
metadata?: InputMaybe<SortOrder>;
@ -1467,7 +1424,9 @@ export enum UserScalarFieldEnum {
DisplayName = 'displayName',
Email = 'email',
EmailVerified = 'emailVerified',
FirstName = 'firstName',
Id = 'id',
LastName = 'lastName',
LastSeen = 'lastSeen',
Locale = 'locale',
Metadata = 'metadata',
@ -1492,12 +1451,13 @@ export type UserUpdateWithoutCommentsInput = {
avatarUrl?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
companies?: InputMaybe<CompanyUpdateManyWithoutAccountOwnerNestedInput>;
createdAt?: InputMaybe<DateTimeFieldUpdateOperationsInput>;
deletedAt?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
disabled?: InputMaybe<BoolFieldUpdateOperationsInput>;
displayName?: InputMaybe<StringFieldUpdateOperationsInput>;
displayName?: InputMaybe<NullableStringFieldUpdateOperationsInput>;
email?: InputMaybe<StringFieldUpdateOperationsInput>;
emailVerified?: InputMaybe<BoolFieldUpdateOperationsInput>;
firstName?: InputMaybe<StringFieldUpdateOperationsInput>;
id?: InputMaybe<StringFieldUpdateOperationsInput>;
lastName?: InputMaybe<StringFieldUpdateOperationsInput>;
lastSeen?: InputMaybe<NullableDateTimeFieldUpdateOperationsInput>;
locale?: InputMaybe<StringFieldUpdateOperationsInput>;
metadata?: InputMaybe<Scalars['JSON']>;
@ -1518,12 +1478,13 @@ export type UserWhereInput = {
comments?: InputMaybe<CommentListRelationFilter>;
companies?: InputMaybe<CompanyListRelationFilter>;
createdAt?: InputMaybe<DateTimeFilter>;
deletedAt?: InputMaybe<DateTimeNullableFilter>;
disabled?: InputMaybe<BoolFilter>;
displayName?: InputMaybe<StringFilter>;
displayName?: InputMaybe<StringNullableFilter>;
email?: InputMaybe<StringFilter>;
emailVerified?: InputMaybe<BoolFilter>;
firstName?: InputMaybe<StringFilter>;
id?: InputMaybe<StringFilter>;
lastName?: InputMaybe<StringFilter>;
lastSeen?: InputMaybe<DateTimeNullableFilter>;
locale?: InputMaybe<StringFilter>;
metadata?: InputMaybe<JsonNullableFilter>;
@ -1548,7 +1509,6 @@ export type Workspace = {
comments?: Maybe<Array<Comment>>;
companies?: Maybe<Array<Company>>;
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
displayName: Scalars['String'];
domainName: Scalars['String'];
id: Scalars['ID'];
@ -1564,7 +1524,6 @@ export type Workspace = {
export type WorkspaceMember = {
__typename?: 'WorkspaceMember';
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
id: Scalars['ID'];
updatedAt: Scalars['DateTime'];
user: User;
@ -1731,12 +1690,12 @@ export type GetPeopleQueryVariables = Exact<{
}>;
export type GetPeopleQuery = { __typename?: 'Query', people: Array<{ __typename?: 'Person', id: string, phone: string, email: string, city: string, firstname: string, lastname: string, createdAt: string, _commentCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null }> };
export type GetPeopleQuery = { __typename?: 'Query', people: Array<{ __typename?: 'Person', id: string, phone: string, email: string, city: string, firstName: string, lastName: string, createdAt: string, _commentCount: number, company?: { __typename?: 'Company', id: string, name: string, domainName: string } | null }> };
export type UpdatePeopleMutationVariables = Exact<{
id?: InputMaybe<Scalars['String']>;
firstname?: InputMaybe<Scalars['String']>;
lastname?: InputMaybe<Scalars['String']>;
firstName?: InputMaybe<Scalars['String']>;
lastName?: InputMaybe<Scalars['String']>;
phone?: InputMaybe<Scalars['String']>;
city?: InputMaybe<Scalars['String']>;
companyId?: InputMaybe<Scalars['String']>;
@ -1745,12 +1704,12 @@ export type UpdatePeopleMutationVariables = Exact<{
}>;
export type UpdatePeopleMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', city: string, email: string, firstname: string, id: string, lastname: string, phone: string, createdAt: string, company?: { __typename?: 'Company', domainName: string, name: string, id: string } | null } | null };
export type UpdatePeopleMutation = { __typename?: 'Mutation', updateOnePerson?: { __typename?: 'Person', id: string, city: string, email: string, firstName: string, lastName: string, phone: string, createdAt: string, company?: { __typename?: 'Company', domainName: string, name: string, id: string } | null } | null };
export type InsertPersonMutationVariables = Exact<{
id: Scalars['String'];
firstname: Scalars['String'];
lastname: Scalars['String'];
firstName: Scalars['String'];
lastName: Scalars['String'];
phone: Scalars['String'];
city: Scalars['String'];
email: Scalars['String'];
@ -1758,7 +1717,7 @@ export type InsertPersonMutationVariables = Exact<{
}>;
export type InsertPersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', city: string, email: string, firstname: string, id: string, lastname: string, phone: string, createdAt: string, company?: { __typename?: 'Company', domainName: string, name: string, id: string } | null } };
export type InsertPersonMutation = { __typename?: 'Mutation', createOnePerson: { __typename?: 'Person', id: string, city: string, email: string, firstName: string, lastName: string, phone: string, createdAt: string, company?: { __typename?: 'Company', domainName: string, name: string, id: string } | null } };
export type DeletePeopleMutationVariables = Exact<{
ids?: InputMaybe<Array<Scalars['String']> | Scalars['String']>;
@ -1774,7 +1733,7 @@ export type SearchPeopleQueryVariables = Exact<{
}>;
export type SearchPeopleQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Person', id: string, phone: string, email: string, city: string, firstname: string, lastname: string, createdAt: string }> };
export type SearchPeopleQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Person', id: string, phone: string, email: string, city: string, firstName: string, lastName: string, createdAt: string }> };
export type SearchUserQueryVariables = Exact<{
where?: InputMaybe<UserWhereInput>;
@ -2593,8 +2552,8 @@ export const GetPeopleDocument = gql`
phone
email
city
firstname
lastname
firstName
lastName
createdAt
_commentCount
company {
@ -2636,11 +2595,12 @@ export type GetPeopleQueryHookResult = ReturnType<typeof useGetPeopleQuery>;
export type GetPeopleLazyQueryHookResult = ReturnType<typeof useGetPeopleLazyQuery>;
export type GetPeopleQueryResult = Apollo.QueryResult<GetPeopleQuery, GetPeopleQueryVariables>;
export const UpdatePeopleDocument = gql`
mutation UpdatePeople($id: String, $firstname: String, $lastname: String, $phone: String, $city: String, $companyId: String, $email: String, $createdAt: DateTime) {
mutation UpdatePeople($id: String, $firstName: String, $lastName: String, $phone: String, $city: String, $companyId: String, $email: String, $createdAt: DateTime) {
updateOnePerson(
where: {id: $id}
data: {city: {set: $city}, company: {connect: {id: $companyId}}, email: {set: $email}, firstname: {set: $firstname}, id: {set: $id}, lastname: {set: $lastname}, phone: {set: $phone}, createdAt: {set: $createdAt}}
data: {city: {set: $city}, company: {connect: {id: $companyId}}, email: {set: $email}, firstName: {set: $firstName}, id: {set: $id}, lastName: {set: $lastName}, phone: {set: $phone}, createdAt: {set: $createdAt}}
) {
id
city
company {
domainName
@ -2648,9 +2608,8 @@ export const UpdatePeopleDocument = gql`
id
}
email
firstname
id
lastname
firstName
lastName
phone
createdAt
}
@ -2672,8 +2631,8 @@ export type UpdatePeopleMutationFn = Apollo.MutationFunction<UpdatePeopleMutatio
* const [updatePeopleMutation, { data, loading, error }] = useUpdatePeopleMutation({
* variables: {
* id: // value for 'id'
* firstname: // value for 'firstname'
* lastname: // value for 'lastname'
* firstName: // value for 'firstName'
* lastName: // value for 'lastName'
* phone: // value for 'phone'
* city: // value for 'city'
* companyId: // value for 'companyId'
@ -2690,10 +2649,11 @@ export type UpdatePeopleMutationHookResult = ReturnType<typeof useUpdatePeopleMu
export type UpdatePeopleMutationResult = Apollo.MutationResult<UpdatePeopleMutation>;
export type UpdatePeopleMutationOptions = Apollo.BaseMutationOptions<UpdatePeopleMutation, UpdatePeopleMutationVariables>;
export const InsertPersonDocument = gql`
mutation InsertPerson($id: String!, $firstname: String!, $lastname: String!, $phone: String!, $city: String!, $email: String!, $createdAt: DateTime) {
mutation InsertPerson($id: String!, $firstName: String!, $lastName: String!, $phone: String!, $city: String!, $email: String!, $createdAt: DateTime) {
createOnePerson(
data: {id: $id, firstname: $firstname, lastname: $lastname, phone: $phone, city: $city, email: $email, createdAt: $createdAt}
data: {id: $id, firstName: $firstName, lastName: $lastName, phone: $phone, city: $city, email: $email, createdAt: $createdAt}
) {
id
city
company {
domainName
@ -2701,9 +2661,8 @@ export const InsertPersonDocument = gql`
id
}
email
firstname
id
lastname
firstName
lastName
phone
createdAt
}
@ -2725,8 +2684,8 @@ export type InsertPersonMutationFn = Apollo.MutationFunction<InsertPersonMutatio
* const [insertPersonMutation, { data, loading, error }] = useInsertPersonMutation({
* variables: {
* id: // value for 'id'
* firstname: // value for 'firstname'
* lastname: // value for 'lastname'
* firstName: // value for 'firstName'
* lastName: // value for 'lastName'
* phone: // value for 'phone'
* city: // value for 'city'
* email: // value for 'email'
@ -2781,8 +2740,8 @@ export const SearchPeopleDocument = gql`
phone
email
city
firstname
lastname
firstName
lastName
createdAt
}
}

View File

@ -109,14 +109,14 @@ export function CommentThreadRelationPicker({ commentThread }: OwnProps) {
const personsForMultiSelect = useFilteredSearchEntityQuery({
queryHook: useSearchPeopleQuery,
searchOnFields: ['firstname', 'lastname'],
orderByField: 'lastname',
searchOnFields: ['firstName', 'lastName'],
orderByField: 'lastName',
selectedIds: peopleIds,
mappingFunction: (entity) =>
({
id: entity.id,
entityType: CommentableType.Person,
name: `${entity.firstname} ${entity.lastname}`,
name: `${entity.firstName} ${entity.lastName}`,
avatarType: 'rounded',
} as CommentableEntityForSelect),
searchFilter,

View File

@ -9,8 +9,8 @@ import { CommentableType, Person } from '~/generated/graphql';
import { PersonChip } from './PersonChip';
type OwnProps = {
person: Pick<Person, 'id' | 'firstname' | 'lastname' | '_commentCount'>;
onChange: (firstname: string, lastname: string) => void;
person: Pick<Person, 'id' | 'firstName' | 'lastName' | '_commentCount'>;
onChange: (firstName: string, lastName: string) => void;
};
const NoEditModeContainer = styled.div`
@ -25,16 +25,16 @@ const RightContainer = styled.div`
`;
export function EditablePeopleFullName({ person, onChange }: OwnProps) {
const [firstnameValue, setFirstnameValue] = useState(person.firstname ?? '');
const [lastnameValue, setLastnameValue] = useState(person.lastname ?? '');
const [firstNameValue, setFirstNameValue] = useState(person.firstName ?? '');
const [lastNameValue, setLastNameValue] = useState(person.lastName ?? '');
const openCommentRightDrawer = useOpenCommentRightDrawer();
function handleDoubleTextChange(
firstValue: string,
secondValue: string,
): void {
setFirstnameValue(firstValue);
setLastnameValue(secondValue);
setFirstNameValue(firstValue);
setLastNameValue(secondValue);
onChange(firstValue, secondValue);
}
@ -53,14 +53,14 @@ export function EditablePeopleFullName({ person, onChange }: OwnProps) {
return (
<EditableDoubleText
firstValue={firstnameValue}
secondValue={lastnameValue}
firstValue={firstNameValue}
secondValue={lastNameValue}
firstValuePlaceholder="First name"
secondValuePlaceholder="Last name"
onChange={handleDoubleTextChange}
nonEditModeContent={
<NoEditModeContainer>
<PersonChip name={person.firstname + ' ' + person.lastname} />
<PersonChip name={person.firstName + ' ' + person.lastName} />
<RightContainer>
<CellCommentChip
count={person._commentCount ?? 0}

View File

@ -6,19 +6,19 @@ describe('reduceSortsToOrderBy', () => {
it('should return an array of objects with the id as key and the order as value', () => {
const sorts = [
{
key: 'firstname',
label: 'firstname',
key: 'firstName',
label: 'firstName',
order: 'asc',
_type: 'default_sort',
},
{
key: 'lastname',
label: 'lastname',
key: 'lastName',
label: 'lastName',
order: 'desc',
_type: 'default_sort',
},
] satisfies PeopleSelectedSortType[];
const result = reduceSortsToOrderBy(sorts);
expect(result).toEqual([{ firstname: 'asc' }, { lastname: 'desc' }]);
expect(result).toEqual([{ firstName: 'asc' }, { lastName: 'desc' }]);
});
});

View File

@ -21,8 +21,8 @@ export const GET_PEOPLE = gql`
phone
email
city
firstname
lastname
firstName
lastName
createdAt
_commentCount
company {

View File

@ -3,8 +3,8 @@ import { gql } from '@apollo/client';
export const UPDATE_PERSON = gql`
mutation UpdatePeople(
$id: String
$firstname: String
$lastname: String
$firstName: String
$lastName: String
$phone: String
$city: String
$companyId: String
@ -17,13 +17,14 @@ export const UPDATE_PERSON = gql`
city: { set: $city }
company: { connect: { id: $companyId } }
email: { set: $email }
firstname: { set: $firstname }
firstName: { set: $firstName }
id: { set: $id }
lastname: { set: $lastname }
lastName: { set: $lastName }
phone: { set: $phone }
createdAt: { set: $createdAt }
}
) {
id
city
company {
domainName
@ -31,9 +32,8 @@ export const UPDATE_PERSON = gql`
id
}
email
firstname
id
lastname
firstName
lastName
phone
createdAt
}
@ -43,8 +43,8 @@ export const UPDATE_PERSON = gql`
export const INSERT_PERSON = gql`
mutation InsertPerson(
$id: String!
$firstname: String!
$lastname: String!
$firstName: String!
$lastName: String!
$phone: String!
$city: String!
$email: String!
@ -53,14 +53,15 @@ export const INSERT_PERSON = gql`
createOnePerson(
data: {
id: $id
firstname: $firstname
lastname: $lastname
firstName: $firstName
lastName: $lastName
phone: $phone
city: $city
email: $email
createdAt: $createdAt
}
) {
id
city
company {
domainName
@ -68,9 +69,8 @@ export const INSERT_PERSON = gql`
id
}
email
firstname
id
lastname
firstName
lastName
phone
createdAt
}

View File

@ -20,8 +20,8 @@ export const SEARCH_PEOPLE_QUERY = gql`
phone
email
city
firstname
lastname
firstName
lastName
createdAt
}
}

View File

@ -63,8 +63,8 @@ export function People() {
await insertPersonMutation({
variables: {
id: uuidv4(),
firstname: '',
lastname: '',
firstName: '',
lastName: '',
email: '',
phone: '',
createdAt: new Date().toISOString(),

View File

@ -26,7 +26,7 @@ export const usePeopleColumns = () => {
return useMemo(() => {
return [
getCheckBoxColumn(),
columnHelper.accessor('firstname', {
columnHelper.accessor('firstName', {
header: () => (
<ColumnHead viewName="People" viewIcon={<IconUser size={16} />} />
),
@ -39,8 +39,8 @@ export const usePeopleColumns = () => {
await updatePerson({
variables: {
...person,
firstname: firstName,
lastname: lastName,
firstName,
lastName,
companyId: person.company?.id,
},
});

View File

@ -23,13 +23,13 @@ export const fullnameFilter = {
whereTemplate: (searchString: string) => ({
OR: [
{
firstname: {
firstName: {
contains: `%${searchString}%`,
mode: QueryMode.Insensitive,
},
},
{
lastname: {
lastName: {
contains: `%${searchString}%`,
mode: QueryMode.Insensitive,
},
@ -45,13 +45,13 @@ export const fullnameFilter = {
{
AND: [
{
firstname: {
firstName: {
contains: `%${searchString}%`,
mode: QueryMode.Insensitive,
},
},
{
lastname: {
lastName: {
contains: `%${searchString}%`,
mode: QueryMode.Insensitive,
},

View File

@ -20,10 +20,10 @@ export const availableSorts = [
_type: 'custom_sort',
orderByTemplates: [
(order: Order_By) => ({
firstname: order,
firstName: order,
}),
(order: Order_By) => ({
lastname: order,
lastName: order,
}),
],
},

View File

@ -12,8 +12,8 @@ function filterData<DataT>(
where: Record<string, any>,
): Array<DataT> {
return data.filter((item) => {
// { firstname: {contains: '%string%' }}
// { firstname: {equals: 'string' }}
// { firstName: {contains: '%string%' }}
// { lastName: {equals: 'string' }}
// { is: { company: { equals: 'string' }}}
let isMatch: boolean = (
Object.keys(where) as Array<keyof typeof where>
@ -57,7 +57,7 @@ function filterData<DataT>(
return false;
});
// { OR: [{ firstname: filter }, { lastname: filter }]
// { OR: [{ firstName: filter }, { lastName: filter }]
if (where.OR && Array.isArray(where.OR)) {
isMatch =
isMatch ||

View File

@ -3,8 +3,8 @@ import { Company, Person } from '~/generated/graphql';
type MockedPerson = Pick<
Person,
| 'id'
| 'firstname'
| 'lastname'
| 'firstName'
| 'lastName'
| 'email'
| '__typename'
| 'phone'
@ -19,8 +19,8 @@ export const mockedPeopleData: Array<MockedPerson> = [
{
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
__typename: 'Person',
firstname: 'Alexandre',
lastname: 'Prot',
firstName: 'Alexandre',
lastName: 'Prot',
email: 'alexandre@qonto.com',
company: {
id: '5c21e19e-e049-4393-8c09-3e3f8fb09ecb',
@ -37,8 +37,8 @@ export const mockedPeopleData: Array<MockedPerson> = [
{
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d',
__typename: 'Person',
firstname: 'John',
lastname: 'Doe',
firstName: 'John',
lastName: 'Doe',
email: 'john@linkedin.com',
company: {
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6e',
@ -55,8 +55,8 @@ export const mockedPeopleData: Array<MockedPerson> = [
{
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6f',
__typename: 'Person',
firstname: 'Jane',
lastname: 'Doe',
firstName: 'Jane',
lastName: 'Doe',
email: 'jane@sequoiacap.com',
company: {
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6g',
@ -73,8 +73,8 @@ export const mockedPeopleData: Array<MockedPerson> = [
{
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6h',
__typename: 'Person',
firstname: 'Janice',
lastname: 'Dane',
firstName: 'Janice',
lastName: 'Dane',
email: 'janice@facebook.com',
company: {
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6i',

View File

@ -24,7 +24,7 @@ front-test:
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn test"
front-graphql-generate:
@docker-compose exec twenty-dev sh -c "cd /app/server && yarn graphql:generate"
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn graphql:generate"
front-storybook:
@docker-compose exec twenty-dev sh -c "cd /app/front && yarn storybook"

View File

@ -9,10 +9,10 @@ export class PersonCountAggregateInput {
id?: true;
@Field(() => Boolean, {nullable:true})
firstname?: true;
firstName?: true;
@Field(() => Boolean, {nullable:true})
lastname?: true;
lastName?: true;
@Field(() => Boolean, {nullable:true})
email?: true;

View File

@ -10,10 +10,10 @@ export class PersonCountAggregate {
id!: number;
@Field(() => Int, {nullable:false})
firstname!: number;
firstName!: number;
@Field(() => Int, {nullable:false})
lastname!: number;
lastName!: number;
@Field(() => Int, {nullable:false})
email!: number;

View File

@ -10,10 +10,10 @@ export class PersonCountOrderByAggregateInput {
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstname?: keyof typeof SortOrder;
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastname?: keyof typeof SortOrder;
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
email?: keyof typeof SortOrder;

View File

@ -13,11 +13,11 @@ export class PersonCreateManyCompanyInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -13,11 +13,11 @@ export class PersonCreateManyWorkspaceInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -13,11 +13,11 @@ export class PersonCreateManyInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -14,11 +14,11 @@ export class PersonCreateWithoutCompanyInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -14,11 +14,11 @@ export class PersonCreateWithoutWorkspaceInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -15,11 +15,11 @@ export class PersonCreateInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -16,11 +16,11 @@ export class PersonGroupBy {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -9,10 +9,10 @@ export class PersonMaxAggregateInput {
id?: true;
@Field(() => Boolean, {nullable:true})
firstname?: true;
firstName?: true;
@Field(() => Boolean, {nullable:true})
lastname?: true;
lastName?: true;
@Field(() => Boolean, {nullable:true})
email?: true;

View File

@ -13,11 +13,11 @@ export class PersonMaxAggregate {
@Field(() => String, {nullable:true})
@Validator.IsString()
firstname?: string;
firstName?: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
lastname?: string;
lastName?: string;
@Field(() => String, {nullable:true})
@Validator.IsEmail()

View File

@ -10,10 +10,10 @@ export class PersonMaxOrderByAggregateInput {
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstname?: keyof typeof SortOrder;
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastname?: keyof typeof SortOrder;
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
email?: keyof typeof SortOrder;

View File

@ -9,10 +9,10 @@ export class PersonMinAggregateInput {
id?: true;
@Field(() => Boolean, {nullable:true})
firstname?: true;
firstName?: true;
@Field(() => Boolean, {nullable:true})
lastname?: true;
lastName?: true;
@Field(() => Boolean, {nullable:true})
email?: true;

View File

@ -13,11 +13,11 @@ export class PersonMinAggregate {
@Field(() => String, {nullable:true})
@Validator.IsString()
firstname?: string;
firstName?: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
lastname?: string;
lastName?: string;
@Field(() => String, {nullable:true})
@Validator.IsEmail()

View File

@ -10,10 +10,10 @@ export class PersonMinOrderByAggregateInput {
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstname?: keyof typeof SortOrder;
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastname?: keyof typeof SortOrder;
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
email?: keyof typeof SortOrder;

View File

@ -13,10 +13,10 @@ export class PersonOrderByWithAggregationInput {
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstname?: keyof typeof SortOrder;
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastname?: keyof typeof SortOrder;
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
email?: keyof typeof SortOrder;

View File

@ -12,10 +12,10 @@ export class PersonOrderByWithRelationInput {
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstname?: keyof typeof SortOrder;
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastname?: keyof typeof SortOrder;
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
email?: keyof typeof SortOrder;

View File

@ -2,8 +2,8 @@ import { registerEnumType } from '@nestjs/graphql';
export enum PersonScalarFieldEnum {
id = "id",
firstname = "firstname",
lastname = "lastname",
firstName = "firstName",
lastName = "lastName",
email = "email",
phone = "phone",
city = "city",

View File

@ -22,10 +22,10 @@ export class PersonScalarWhereWithAggregatesInput {
id?: StringWithAggregatesFilter;
@Field(() => StringWithAggregatesFilter, {nullable:true})
firstname?: StringWithAggregatesFilter;
firstName?: StringWithAggregatesFilter;
@Field(() => StringWithAggregatesFilter, {nullable:true})
lastname?: StringWithAggregatesFilter;
lastName?: StringWithAggregatesFilter;
@Field(() => StringWithAggregatesFilter, {nullable:true})
email?: StringWithAggregatesFilter;

View File

@ -22,10 +22,10 @@ export class PersonScalarWhereInput {
id?: StringFilter;
@Field(() => StringFilter, {nullable:true})
firstname?: StringFilter;
firstName?: StringFilter;
@Field(() => StringFilter, {nullable:true})
lastname?: StringFilter;
lastName?: StringFilter;
@Field(() => StringFilter, {nullable:true})
email?: StringFilter;

View File

@ -13,11 +13,11 @@ export class PersonUncheckedCreateWithoutCompanyInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -13,11 +13,11 @@ export class PersonUncheckedCreateWithoutWorkspaceInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -13,11 +13,11 @@ export class PersonUncheckedCreateInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -13,10 +13,10 @@ export class PersonUncheckedUpdateManyWithoutPeopleInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -13,10 +13,10 @@ export class PersonUncheckedUpdateManyInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -12,10 +12,10 @@ export class PersonUncheckedUpdateWithoutCompanyInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -13,10 +13,10 @@ export class PersonUncheckedUpdateWithoutWorkspaceInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -13,10 +13,10 @@ export class PersonUncheckedUpdateInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -12,10 +12,10 @@ export class PersonUpdateManyMutationInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -13,10 +13,10 @@ export class PersonUpdateWithoutCompanyInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -13,10 +13,10 @@ export class PersonUpdateWithoutWorkspaceInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -14,10 +14,10 @@ export class PersonUpdateInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
firstname?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastname?: StringFieldUpdateOperationsInput;
lastName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -24,10 +24,10 @@ export class PersonWhereInput {
id?: StringFilter;
@Field(() => StringFilter, {nullable:true})
firstname?: StringFilter;
firstName?: StringFilter;
@Field(() => StringFilter, {nullable:true})
lastname?: StringFilter;
lastName?: StringFilter;
@Field(() => StringFilter, {nullable:true})
email?: StringFilter;

View File

@ -12,10 +12,10 @@ export class Person {
id!: string;
@Field(() => String, {nullable:false})
firstname!: string;
firstName!: string;
@Field(() => String, {nullable:false})
lastname!: string;
lastName!: string;
@Field(() => String, {nullable:false})
email!: string;

View File

@ -8,6 +8,12 @@ export class UserCountAggregateInput {
@Field(() => Boolean, {nullable:true})
id?: true;
@Field(() => Boolean, {nullable:true})
firstName?: true;
@Field(() => Boolean, {nullable:true})
lastName?: true;
@Field(() => Boolean, {nullable:true})
displayName?: true;

View File

@ -10,6 +10,12 @@ export class UserCountAggregate {
id!: number;
@Field(() => Int, {nullable:false})
firstName!: number;
@Field(() => Int, {nullable:false})
lastName!: number;
@HideField()
displayName!: number;
@Field(() => Int, {nullable:false})

View File

@ -9,6 +9,12 @@ export class UserCountOrderByAggregateInput {
@Field(() => SortOrder, {nullable:true})
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
displayName?: keyof typeof SortOrder;

View File

@ -14,8 +14,16 @@ export class UserCreateManyInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,16 @@ export class UserCreateWithoutCommentsInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,16 @@ export class UserCreateWithoutCompaniesInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,16 @@ export class UserCreateWithoutRefreshTokensInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,16 @@ export class UserCreateWithoutWorkspaceMemberInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -18,8 +18,16 @@ export class UserCreateInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,14 @@ export class UserGroupBy {
@Field(() => String, {nullable:false})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@HideField()
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -8,6 +8,12 @@ export class UserMaxAggregateInput {
@Field(() => Boolean, {nullable:true})
id?: true;
@Field(() => Boolean, {nullable:true})
firstName?: true;
@Field(() => Boolean, {nullable:true})
lastName?: true;
@Field(() => Boolean, {nullable:true})
displayName?: true;

View File

@ -13,7 +13,13 @@ export class UserMaxAggregate {
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
firstName?: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
lastName?: string;
@HideField()
displayName?: string;
@Field(() => String, {nullable:true})

View File

@ -9,6 +9,12 @@ export class UserMaxOrderByAggregateInput {
@Field(() => SortOrder, {nullable:true})
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
displayName?: keyof typeof SortOrder;

View File

@ -8,6 +8,12 @@ export class UserMinAggregateInput {
@Field(() => Boolean, {nullable:true})
id?: true;
@Field(() => Boolean, {nullable:true})
firstName?: true;
@Field(() => Boolean, {nullable:true})
lastName?: true;
@Field(() => Boolean, {nullable:true})
displayName?: true;

View File

@ -13,7 +13,13 @@ export class UserMinAggregate {
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
firstName?: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
lastName?: string;
@HideField()
displayName?: string;
@Field(() => String, {nullable:true})

View File

@ -9,6 +9,12 @@ export class UserMinOrderByAggregateInput {
@Field(() => SortOrder, {nullable:true})
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
displayName?: keyof typeof SortOrder;

View File

@ -12,6 +12,12 @@ export class UserOrderByWithAggregationInput {
@Field(() => SortOrder, {nullable:true})
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
displayName?: keyof typeof SortOrder;

View File

@ -13,6 +13,12 @@ export class UserOrderByWithRelationInput {
@Field(() => SortOrder, {nullable:true})
id?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
firstName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
lastName?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
displayName?: keyof typeof SortOrder;

View File

@ -2,6 +2,8 @@ import { registerEnumType } from '@nestjs/graphql';
export enum UserScalarFieldEnum {
id = "id",
firstName = "firstName",
lastName = "lastName",
displayName = "displayName",
email = "email",
emailVerified = "emailVerified",

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringWithAggregatesFilter } from '../prisma/string-with-aggregates-filter.input';
import { BoolWithAggregatesFilter } from '../prisma/bool-with-aggregates-filter.input';
import { StringNullableWithAggregatesFilter } from '../prisma/string-nullable-with-aggregates-filter.input';
import { BoolWithAggregatesFilter } from '../prisma/bool-with-aggregates-filter.input';
import { DateTimeNullableWithAggregatesFilter } from '../prisma/date-time-nullable-with-aggregates-filter.input';
import { HideField } from '@nestjs/graphql';
import { JsonNullableWithAggregatesFilter } from '../prisma/json-nullable-with-aggregates-filter.input';
@ -24,7 +24,13 @@ export class UserScalarWhereWithAggregatesInput {
id?: StringWithAggregatesFilter;
@Field(() => StringWithAggregatesFilter, {nullable:true})
displayName?: StringWithAggregatesFilter;
firstName?: StringWithAggregatesFilter;
@Field(() => StringWithAggregatesFilter, {nullable:true})
lastName?: StringWithAggregatesFilter;
@Field(() => StringNullableWithAggregatesFilter, {nullable:true})
displayName?: StringNullableWithAggregatesFilter;
@Field(() => StringWithAggregatesFilter, {nullable:true})
email?: StringWithAggregatesFilter;

View File

@ -17,8 +17,16 @@ export class UserUncheckedCreateWithoutCommentsInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,16 @@ export class UserUncheckedCreateWithoutCompaniesInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,16 @@ export class UserUncheckedCreateWithoutRefreshTokensInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -17,8 +17,16 @@ export class UserUncheckedCreateWithoutWorkspaceMemberInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -18,8 +18,16 @@ export class UserUncheckedCreateInput {
@Field(() => String, {nullable:false})
@Validator.IsString()
firstName!: string;
@Field(() => String, {nullable:false})
@Validator.IsString()
lastName!: string;
@Field(() => String, {nullable:true})
@Validator.IsString()
@Validator.IsOptional()
displayName!: string;
displayName?: string;
@Field(() => String, {nullable:false})
@Validator.IsEmail()

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -16,7 +16,13 @@ export class UserUncheckedUpdateManyInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUncheckedUpdateWithoutCommentsInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUncheckedUpdateWithoutCompaniesInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUncheckedUpdateWithoutRefreshTokensInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUncheckedUpdateWithoutWorkspaceMemberInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -20,7 +20,13 @@ export class UserUncheckedUpdateInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -16,7 +16,13 @@ export class UserUpdateManyMutationInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUpdateWithoutCommentsInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUpdateWithoutCompaniesInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUpdateWithoutRefreshTokensInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -19,7 +19,13 @@ export class UserUpdateWithoutWorkspaceMemberInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-string-field-update-operations.input';
import { BoolFieldUpdateOperationsInput } from '../prisma/bool-field-update-operations.input';
import { NullableDateTimeFieldUpdateOperationsInput } from '../prisma/nullable-date-time-field-update-operations.input';
import { HideField } from '@nestjs/graphql';
import { GraphQLJSON } from 'graphql-type-json';
@ -20,7 +20,13 @@ export class UserUpdateInput {
id?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
displayName?: StringFieldUpdateOperationsInput;
firstName?: StringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
lastName?: StringFieldUpdateOperationsInput;
@Field(() => NullableStringFieldUpdateOperationsInput, {nullable:true})
displayName?: NullableStringFieldUpdateOperationsInput;
@Field(() => StringFieldUpdateOperationsInput, {nullable:true})
email?: StringFieldUpdateOperationsInput;

View File

@ -1,8 +1,8 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFilter } from '../prisma/string-filter.input';
import { BoolFilter } from '../prisma/bool-filter.input';
import { StringNullableFilter } from '../prisma/string-nullable-filter.input';
import { BoolFilter } from '../prisma/bool-filter.input';
import { DateTimeNullableFilter } from '../prisma/date-time-nullable-filter.input';
import { HideField } from '@nestjs/graphql';
import { JsonNullableFilter } from '../prisma/json-nullable-filter.input';
@ -28,7 +28,13 @@ export class UserWhereInput {
id?: StringFilter;
@Field(() => StringFilter, {nullable:true})
displayName?: StringFilter;
firstName?: StringFilter;
@Field(() => StringFilter, {nullable:true})
lastName?: StringFilter;
@Field(() => StringNullableFilter, {nullable:true})
displayName?: StringNullableFilter;
@Field(() => StringFilter, {nullable:true})
email?: StringFilter;

View File

@ -16,7 +16,13 @@ export class User {
id!: string;
@Field(() => String, {nullable:false})
displayName!: string;
firstName!: string;
@Field(() => String, {nullable:false})
lastName!: string;
@HideField()
displayName!: string | null;
@Field(() => String, {nullable:false})
email!: string;

View File

@ -10,7 +10,6 @@ import { AuthGuard } from '@nestjs/passport';
import { Response } from 'express';
import { GoogleRequest } from '../strategies/google.auth.strategy';
import { UserService } from '../../user/user.service';
import { assertNotNull } from 'src/utils/assert';
import { TokenService } from '../services/token.service';
@Controller('auth/google')
@ -31,12 +30,12 @@ export class GoogleAuthController {
@UseGuards(AuthGuard('google'))
async googleAuthRedirect(@Req() req: GoogleRequest, @Res() res: Response) {
const { firstName, lastName, email } = req.user;
const displayName = [firstName, lastName].filter(assertNotNull).join(' ');
const user = await this.userService.createUser({
data: {
email,
displayName,
firstName: firstName ?? '',
lastName: lastName ?? '',
locale: 'en',
},
});

View File

@ -1,6 +1,7 @@
import {
IsEmail,
IsNotEmpty,
IsOptional,
IsString,
Matches,
MinLength,
@ -22,8 +23,21 @@ export class RegisterInput {
@Matches(PASSWORD_REGEX, { message: 'password too weak' })
password: string;
@Field(() => String, {
deprecationReason: 'Deprecated, please use firstName and lastName instead',
nullable: true,
})
@IsOptional()
@IsString()
displayName?: string;
@Field(() => String)
@IsNotEmpty()
@IsString()
displayName: string;
firstName: string;
@Field(() => String)
@IsNotEmpty()
@IsString()
lastName: string;
}

View File

@ -43,7 +43,8 @@ export class AuthService {
const user = await this.userService.createUser({
data: {
displayName: registerInput.displayName,
firstName: registerInput.firstName,
lastName: registerInput.lastName,
email: registerInput.email,
passwordHash,
locale: 'en',

View File

@ -1,4 +1,4 @@
import * as TypeGraphQL from '@nestjs/graphql';
import { Resolver, ResolveField, Root, Int } from '@nestjs/graphql';
import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model';
import { Comment } from 'src/core/@generated/comment/comment.model';
import { Company } from 'src/core/@generated/company/company.model';
@ -9,18 +9,18 @@ import {
PrismaSelector,
} from 'src/decorators/prisma-select.decorator';
@TypeGraphQL.Resolver(() => Company)
@Resolver(() => Company)
export class CompanyRelationsResolver {
constructor(
private readonly commentThreadService: CommentThreadService,
private readonly commentService: CommentService,
) {}
@TypeGraphQL.ResolveField(() => [CommentThread], {
@ResolveField(() => [CommentThread], {
nullable: false,
})
async commentThreads(
@TypeGraphQL.Root() company: Company,
@Root() company: Company,
@PrismaSelector({ modelName: 'CommentThread' })
prismaSelect: PrismaSelect<'CommentThread'>,
): Promise<Partial<CommentThread>[]> {
@ -37,11 +37,11 @@ export class CompanyRelationsResolver {
});
}
@TypeGraphQL.ResolveField(() => [Comment], {
@ResolveField(() => [Comment], {
nullable: false,
})
async comments(
@TypeGraphQL.Root() company: Company,
@Root() company: Company,
@PrismaSelector({ modelName: 'Comment' })
prismaSelect: PrismaSelect<'Comment'>,
): Promise<Partial<Comment>[]> {
@ -60,10 +60,10 @@ export class CompanyRelationsResolver {
});
}
@TypeGraphQL.ResolveField(() => TypeGraphQL.Int, {
@ResolveField(() => Int, {
nullable: false,
})
async _commentCount(@TypeGraphQL.Root() company: Company): Promise<number> {
async _commentCount(@Root() company: Company): Promise<number> {
return this.commentService.count({
where: {
commentThread: {

View File

@ -1,4 +1,4 @@
import * as TypeGraphQL from '@nestjs/graphql';
import { Resolver, Root, ResolveField, Int } from '@nestjs/graphql';
import { CommentThread } from 'src/core/@generated/comment-thread/comment-thread.model';
import { Comment } from 'src/core/@generated/comment/comment.model';
import { Person } from 'src/core/@generated/person/person.model';
@ -9,18 +9,18 @@ import {
PrismaSelector,
} from 'src/decorators/prisma-select.decorator';
@TypeGraphQL.Resolver(() => Person)
@Resolver(() => Person)
export class PersonRelationsResolver {
constructor(
private readonly commentThreadService: CommentThreadService,
private readonly commentService: CommentService,
) {}
@TypeGraphQL.ResolveField(() => [CommentThread], {
@ResolveField(() => [CommentThread], {
nullable: false,
})
async commentThreads(
@TypeGraphQL.Root() person: Person,
@Root() person: Person,
@PrismaSelector({ modelName: 'CommentThread' })
prismaSelect: PrismaSelect<'CommentThread'>,
): Promise<Partial<CommentThread>[]> {
@ -37,11 +37,11 @@ export class PersonRelationsResolver {
});
}
@TypeGraphQL.ResolveField(() => [Comment], {
@ResolveField(() => [Comment], {
nullable: false,
})
async comments(
@TypeGraphQL.Root() person: Person,
@Root() person: Person,
@PrismaSelector({ modelName: 'Comment' })
prismaSelect: PrismaSelect<'Comment'>,
): Promise<Partial<Comment>[]> {
@ -60,10 +60,10 @@ export class PersonRelationsResolver {
});
}
@TypeGraphQL.ResolveField(() => TypeGraphQL.Int, {
@ResolveField(() => Int, {
nullable: false,
})
async _commentCount(@TypeGraphQL.Root() person: Person): Promise<number> {
async _commentCount(@Root() person: Person): Promise<number> {
return this.commentService.count({
where: {
commentThread: {

View File

@ -1,4 +1,4 @@
import { Args, Resolver, Query } from '@nestjs/graphql';
import { Args, Resolver, Query, ResolveField, Parent } from '@nestjs/graphql';
import { UserService } from './user.service';
import { FindManyUserArgs } from 'src/core/@generated/user/find-many-user.args';
import { Workspace } from '@prisma/client';
@ -46,4 +46,16 @@ export class UserResolver {
select: prismaSelect.value,
});
}
@ResolveField(() => String, {
nullable: false,
})
displayName(@Parent() parent: User): string {
// TODO: Should be removed when displayName is removed from the database
if (!parent.firstName && !parent.lastName) {
return parent.displayName ?? '';
}
return `${parent.firstName} ${parent.lastName}`;
}
}

View File

@ -1,5 +1,5 @@
import * as TypeGraphQL from '@nestjs/graphql';
import { Resolver } from '@nestjs/graphql';
import { WorkspaceMember } from '../../@generated/workspace-member/workspace-member.model';
@TypeGraphQL.Resolver(() => WorkspaceMember)
@Resolver(() => WorkspaceMember)
export class WorkspaceMemberResolver {}

View File

@ -0,0 +1,11 @@
/*
Warnings:
- Added the required column `firstName` to the `users` table without a default value. This is not possible if the table is not empty.
- Added the required column `lastName` to the `users` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "users" ADD COLUMN "firstName" TEXT NOT NULL DEFAULT '',
ADD COLUMN "lastName" TEXT NOT NULL DEFAULT '',
ALTER COLUMN "displayName" DROP NOT NULL;

View File

@ -0,0 +1,19 @@
-- AlterTable
ALTER TABLE "people"
ADD COLUMN "firstName" TEXT,
ADD COLUMN "lastName" TEXT;
-- Update new columns using old columns
UPDATE "people"
SET "firstName" = "firstname",
"lastName" = "lastname";
-- Drop old columns
ALTER TABLE "people"
DROP COLUMN "firstname",
DROP COLUMN "lastname";
-- Make new columns NOT NULL
ALTER TABLE "people"
ALTER COLUMN "firstName" SET NOT NULL,
ALTER COLUMN "lastName" SET NOT NULL;

View File

@ -135,8 +135,14 @@ model User {
/// @Validator.IsOptional()
id String @id @default(uuid())
/// @Validator.IsString()
firstName String
/// @Validator.IsString()
lastName String
// @deprecated: Use `firstName` and `lastName` instead
/// @Validator.IsString()
/// @Validator.IsOptional()
displayName String
/// @TypeGraphQL.omit(input: false, output: true)
displayName String?
/// @Validator.IsEmail()
email String @unique
/// @Validator.IsBoolean()
@ -266,9 +272,9 @@ model Person {
/// @Validator.IsOptional()
id String @id @default(uuid())
/// @Validator.IsString()
firstname String
firstName String
/// @Validator.IsString()
lastname String
lastName String
/// @Validator.IsEmail()
email String
/// @Validator.IsPhoneNumber()

View File

@ -5,8 +5,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-86083141-1c0e-494c-a1b6-85b1c6fefaa5',
firstname: 'Christoph',
lastname: 'Callisto',
firstName: 'Christoph',
lastName: 'Callisto',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33789012345',
city: 'Seattle',
@ -20,8 +20,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-0aa00beb-ac73-4797-824e-87a1f5aea9e0',
firstname: 'Sylvie',
lastname: 'Palmer',
firstName: 'Sylvie',
lastName: 'Palmer',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33780123456',
city: 'Los Angeles',
@ -35,8 +35,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-93c72d2e-f517-42fd-80ae-14173b3b70ae',
firstname: 'Christopher',
lastname: 'Gonzalez',
firstName: 'Christopher',
lastName: 'Gonzalez',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33789012345',
city: 'Seattle',
@ -50,8 +50,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-eeeacacf-eee1-4690-ad2c-8619e5b56a2e',
firstname: 'Ashley',
lastname: 'Parker',
firstName: 'Ashley',
lastName: 'Parker',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33780123456',
city: 'Los Angeles',
@ -65,8 +65,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-9b324a88-6784-4449-afdf-dc62cb8702f2',
firstname: 'Nicholas',
lastname: 'Wright',
firstName: 'Nicholas',
lastName: 'Wright',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33781234567',
city: 'Seattle',
@ -80,8 +80,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-1d151852-490f-4466-8391-733cfd66a0c8',
firstname: 'Isabella',
lastname: 'Scott',
firstName: 'Isabella',
lastName: 'Scott',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33782345678',
city: 'New York',
@ -95,8 +95,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-98406e26-80f1-4dff-b570-a74942528de3',
firstname: 'Matthew',
lastname: 'Green',
firstName: 'Matthew',
lastName: 'Green',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33783456789',
city: 'Seattle',
@ -110,8 +110,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-a2e78a5f-338b-46df-8811-fa08c7d19d35',
firstname: 'Elizabeth',
lastname: 'Baker',
firstName: 'Elizabeth',
lastName: 'Baker',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33784567890',
city: 'New York',
@ -125,8 +125,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-ca1f5bf3-64ad-4b0e-bbfd-e9fd795b7016',
firstname: 'Christopher',
lastname: 'Nelson',
firstName: 'Christopher',
lastName: 'Nelson',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33785678901',
city: 'San Francisco',
@ -140,8 +140,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-56955422-5d54-41b7-ba36-f0d20e1417ae',
firstname: 'Avery',
lastname: 'Carter',
firstName: 'Avery',
lastName: 'Carter',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33786789012',
city: 'New York',
@ -155,8 +155,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-755035db-623d-41fe-92e7-dd45b7c568e1',
firstname: 'Ethan',
lastname: 'Mitchell',
firstName: 'Ethan',
lastName: 'Mitchell',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33787890123',
city: 'Los Angeles',
@ -170,8 +170,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-240da2ec-2d40-4e49-8df4-9c6a049190ef',
firstname: 'Madison',
lastname: 'Perez',
firstName: 'Madison',
lastName: 'Perez',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33788901234',
city: 'Seattle',
@ -185,8 +185,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-240da2ec-2d40-4e49-8df4-9c6a049190df',
firstname: 'Bertrand',
lastname: 'Voulzy',
firstName: 'Bertrand',
lastName: 'Voulzy',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33788901234',
city: 'Seattle',
@ -200,8 +200,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-240da2ec-2d40-4e49-8df4-9c6a049190dg',
firstname: 'Louis',
lastname: 'Duss',
firstName: 'Louis',
lastName: 'Duss',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
phone: '+33788901234',
city: 'Seattle',
@ -215,8 +215,8 @@ export const seedPeople = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-dev-240da2ec-2d40-4e49-8df4-9c6a049190dh',
firstname: 'Lorie',
lastname: 'Vladim',
firstName: 'Lorie',
lastName: 'Vladim',
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',
phone: '+33788901235',
city: 'Seattle',

View File

@ -5,7 +5,8 @@ export const seedUsers = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-ge256b39-3ec3-4fe3-8997-b76aa0bfc102',
displayName: 'Tim Apple',
firstName: 'Tim',
lastName: 'Apple',
email: 'tim@apple.dev',
passwordHash:
'$2a$10$p2Pqc80JZX6bx/PkZJkC9OA/AasSHM7PMBk7mR3PCM0XSeKwDtwNa', // applecar2025
@ -30,7 +31,8 @@ export const seedUsers = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-ge256b39-3ec3-4fe3-8997-b76aa0bfa408',
displayName: 'Jony Ive',
firstName: 'Jony',
lastName: 'Ive',
email: 'jony.ive@apple.dev',
locale: 'en',
avatarUrl:
@ -49,7 +51,8 @@ export const seedUsers = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-gk256b39-3ec3-4fe3-8997-b76aa0bfa408',
displayName: 'Phil Schiler',
firstName: 'Phil',
lastName: 'Schiler',
email: 'phil.schiler@apple.dev',
locale: 'en',
avatarUrl:
@ -68,7 +71,8 @@ export const seedUsers = async (prisma: PrismaClient) => {
update: {},
create: {
id: 'twenty-dev-gk256b39-3ec3-4fe3-8997-b76aa0boa408',
displayName: 'Charles Bochet',
firstName: 'Charles',
lastName: 'Bochet',
email: 'charles@twenty.dev',
locale: 'en',
workspaceMember: {