Add soft delete to metadata (#2072)
This commit is contained in:
@ -58,9 +58,4 @@ export class CreateFieldInput {
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
icon?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
placeholder?: string;
|
||||
}
|
||||
|
||||
@ -34,11 +34,6 @@ export class UpdateFieldInput {
|
||||
@Field({ nullable: true })
|
||||
icon?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
placeholder?: string;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
@Field({ nullable: true })
|
||||
|
||||
@ -3,6 +3,7 @@ import { Field, ID, ObjectType } from '@nestjs/graphql';
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
DeleteDateColumn,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
@ -76,8 +77,7 @@ export class FieldMetadata {
|
||||
@Column({ nullable: true, name: 'icon' })
|
||||
icon: string;
|
||||
|
||||
@Field({ nullable: true })
|
||||
@Column({ nullable: true, name: 'placeholder' })
|
||||
@Field({ nullable: true, deprecationReason: 'Use label name instead' })
|
||||
placeholder: string;
|
||||
|
||||
@Column('text', { nullable: true, array: true })
|
||||
@ -109,4 +109,7 @@ export class FieldMetadata {
|
||||
@Field()
|
||||
@UpdateDateColumn({ name: 'updated_at' })
|
||||
updatedAt: Date;
|
||||
|
||||
@DeleteDateColumn({ name: 'deleted_at' })
|
||||
deletedAt?: Date;
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadata> {
|
||||
private readonly tenantMigrationService: TenantMigrationService,
|
||||
private readonly migrationRunnerService: MigrationRunnerService,
|
||||
) {
|
||||
super(fieldMetadataRepository);
|
||||
super(fieldMetadataRepository, { useSoftDelete: true });
|
||||
}
|
||||
|
||||
override async createOne(record: FieldMetadata): Promise<FieldMetadata> {
|
||||
|
||||
Reference in New Issue
Block a user