Commit f674d72b authored by nanahira's avatar nanahira

readme

parent 5eb9bb58
This diff is collapsed.
......@@ -62,14 +62,9 @@ export function StringIdBase(idOptions: StringIdOptions) {
columnExtras: { primary: true, nullable: false },
}),
Reflect.metadata('design:type', String),
...(idOptions.uuid ? [
Generated('uuid'),
NotWritable(),
] : [
IsString(),
IsNotEmpty(),
NotChangeable(),
])
...(idOptions.uuid
? [Generated('uuid'), NotWritable()]
: [IsString(), IsNotEmpty(), NotChangeable()]),
];
const dec = MergePropertyDecorators(decs);
dec(cl.prototype, 'id');
......
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