This commit is contained in:
2025-11-09 11:25:26 +03:30
commit 06f814b331
62 changed files with 31547 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import { Entity, PrimaryKey, Property, OptionalProps } from '@mikro-orm/core';
@Entity({ tableName: 'admns' })
export class Admin {
[OptionalProps]?: 'id' | 'createdAt' | 'updatedAt';
@PrimaryKey()
id!: number;
@Property({ nullable: true })
firstName?: string;
@Property({ nullable: true })
lastName?: string;
@Property({ unique: true })
phone!: string;
@Property({ defaultRaw: 'now()', columnType: 'timestamptz' })
createdAt: Date = new Date();
@Property({ onUpdate: () => new Date(), defaultRaw: 'now()', columnType: 'timestamptz' })
updatedAt: Date = new Date();
}