Commit dbd390ad authored by nanahira's avatar nanahira

fix

parent ebe91c82
Pipeline #6881 passed with stages
in 1 minute and 28 seconds
......@@ -8,7 +8,7 @@ import {
import { IdWise } from '../interfaces/wises';
import { ApiProperty } from '@nestjs/swagger';
import { applyQueryProperty } from '../utility/query';
import { NotChangeable } from '../decorators/transform';
import { NotChangeable, NotWritable } from '../decorators/transform';
import { IsInt, IsOptional, IsPositive } from 'class-validator';
import { BigintTransformer } from '../utility/bigint-transform';
......@@ -16,8 +16,7 @@ export class IdBase extends DeletionBase implements IdWise {
@Generated('increment')
@Column('int8', { primary: true, transformer: new BigintTransformer() })
@ApiProperty({ description: '编号', required: false })
@NotChangeable()
@IsOptional()
@NotWritable()
@IsInt()
@IsPositive()
id: number;
......
......@@ -7,7 +7,7 @@ export const CreatePipe = new ValidationPipe({
export const GetPipe = new ValidationPipe({
transform: true,
transformOptions: { groups: ['r'] },
transformOptions: { groups: ['r'], enableImplicitConversion: true },
skipMissingProperties: true,
skipNullProperties: true,
skipUndefinedProperties: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment