Files
goumrah-api/src/database/entities/country.entity.ts
2025-11-15 22:28:58 +07:00

24 lines
428 B
TypeScript

import { Entity, PrimaryKey, Property } from "@mikro-orm/core";
@Entity()
export class Country {
@PrimaryKey({ type: "varchar", length: 30 })
id!: string;
@Property({ type: "varchar", length: 100 })
name!: string;
@Property({
type: "timestamp",
onCreate: () => new Date(),
})
createdAt!: Date;
@Property({
type: "timestamp",
onCreate: () => new Date(),
onUpdate: () => new Date(),
})
updatedAt!: Date;
}