Commit f674d72b authored by nanahira's avatar nanahira

readme

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