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; }