Commit d84a8af6 authored by nanahira's avatar nanahira

fix

parent 34934752
Pipeline #10445 passed with stages
in 2 minutes and 33 seconds
......@@ -30,6 +30,7 @@ export const RelationColumn = (
IsInt(),
IsPositive(),
]);
export const StringRelationColumn = (
description = '对应编号',
notNull = false,
......@@ -38,7 +39,12 @@ export const StringRelationColumn = (
) =>
MergePropertyDecorators([
Column('varchar', { length: 32, nullable: !notNull, ...columnExtras }),
ApiProperty({ type: String, description, ...propertyExtras }),
ApiProperty({
type: String,
required: notNull,
description,
...propertyExtras,
}),
...(notNull ? [] : [IsOptional()]),
IsNotEmpty(),
]);
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