This commit is contained in:
2025-11-22 17:02:53 +03:30
parent 852c5f722b
commit f3607ad407
5 changed files with 25 additions and 54 deletions
@@ -1,6 +1,5 @@
import { Entity, Property } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { PolygonType } from '../types/polygun.type';
@Entity({ tableName: 'restaurants' })
export class Restaurant extends BaseEntity {
@@ -27,8 +26,11 @@ export class Restaurant extends BaseEntity {
@Property({ type: 'decimal', precision: 10, scale: 7, nullable: true })
longitude?: number;
@Property({ type: PolygonType, nullable: true })
serviceArea?: string;
@Property({ type: 'json', nullable: true })
serviceArea?: {
type: 'Polygon';
coordinates: number[][][];
};
// --- وضعیت‌ها ---
@Property({ default: true })