This commit is contained in:
2025-11-10 23:00:59 +03:30
parent bca4b75b6a
commit 6a25bf9116
6 changed files with 28 additions and 49 deletions
+2 -2
View File
@@ -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({