feat: refactor folder structure (#4498)
* feat: wip refactor folder structure * Fix * fix position --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
import {
|
||||
Field,
|
||||
HideField,
|
||||
ID,
|
||||
InputType,
|
||||
OmitType,
|
||||
PartialType,
|
||||
} from '@nestjs/graphql';
|
||||
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsNotEmpty, IsUUID, ValidateNested } from 'class-validator';
|
||||
|
||||
import { FieldMetadataDTO } from 'src/engine-metadata/field-metadata/dtos/field-metadata.dto';
|
||||
|
||||
@InputType()
|
||||
export class UpdateFieldInput extends OmitType(
|
||||
PartialType(FieldMetadataDTO, InputType),
|
||||
['id', 'type', 'createdAt', 'updatedAt'] as const,
|
||||
) {
|
||||
@HideField()
|
||||
id: string;
|
||||
|
||||
@HideField()
|
||||
workspaceId: string;
|
||||
}
|
||||
|
||||
@InputType()
|
||||
export class UpdateOneFieldMetadataInput {
|
||||
@IsUUID()
|
||||
@IsNotEmpty()
|
||||
@Field(() => ID, { description: 'The id of the record to update' })
|
||||
id!: string;
|
||||
|
||||
@Type(() => UpdateFieldInput)
|
||||
@ValidateNested()
|
||||
@Field(() => UpdateFieldInput, {
|
||||
description: 'The record to update',
|
||||
})
|
||||
update!: UpdateFieldInput;
|
||||
}
|
||||
Reference in New Issue
Block a user