update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { PrimaryKey, Property, sql, Filter, OptionalProps } from '@mikro-orm/core';
|
||||
import { PrimaryKey, Property, Filter, OptionalProps } from '@mikro-orm/core';
|
||||
import { ulid } from 'ulid';
|
||||
|
||||
@Filter({ name: 'notDeleted', cond: { deletedAt: null }, default: true })
|
||||
@@ -8,7 +8,7 @@ export abstract class BaseEntity {
|
||||
@PrimaryKey({ type: 'string', columnType: 'char(26)' })
|
||||
id: string = ulid();
|
||||
|
||||
@Property({ default: sql.now(), type: 'timestamptz' })
|
||||
@Property({ defaultRaw: 'now()', columnType: 'timestamptz' })
|
||||
createdAt: Date = new Date();
|
||||
|
||||
@Property({
|
||||
|
||||
Reference in New Issue
Block a user