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 { ...@@ -8,7 +8,7 @@ import {
import { IdWise } from '../interfaces/wises'; import { IdWise } from '../interfaces/wises';
import { ApiProperty } from '@nestjs/swagger'; import { ApiProperty } from '@nestjs/swagger';
import { applyQueryProperty } from '../utility/query'; import { applyQueryProperty } from '../utility/query';
import { NotChangeable } from '../decorators/transform'; import { NotChangeable, NotWritable } from '../decorators/transform';
import { IsInt, IsOptional, IsPositive } from 'class-validator'; import { IsInt, IsOptional, IsPositive } from 'class-validator';
import { BigintTransformer } from '../utility/bigint-transform'; import { BigintTransformer } from '../utility/bigint-transform';
...@@ -16,8 +16,7 @@ export class IdBase extends DeletionBase implements IdWise { ...@@ -16,8 +16,7 @@ export class IdBase extends DeletionBase implements IdWise {
@Generated('increment') @Generated('increment')
@Column('int8', { primary: true, transformer: new BigintTransformer() }) @Column('int8', { primary: true, transformer: new BigintTransformer() })
@ApiProperty({ description: '编号', required: false }) @ApiProperty({ description: '编号', required: false })
@NotChangeable() @NotWritable()
@IsOptional()
@IsInt() @IsInt()
@IsPositive() @IsPositive()
id: number; id: number;
......
...@@ -7,7 +7,7 @@ export const CreatePipe = new ValidationPipe({ ...@@ -7,7 +7,7 @@ export const CreatePipe = new ValidationPipe({
export const GetPipe = new ValidationPipe({ export const GetPipe = new ValidationPipe({
transform: true, transform: true,
transformOptions: { groups: ['r'] }, transformOptions: { groups: ['r'], enableImplicitConversion: true },
skipMissingProperties: true, skipMissingProperties: true,
skipNullProperties: true, skipNullProperties: true,
skipUndefinedProperties: 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