sservice area

This commit is contained in:
2025-11-22 16:43:32 +03:30
parent f30b1729d3
commit 852c5f722b
5 changed files with 60 additions and 10 deletions
@@ -1,5 +1,6 @@
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 {
@@ -20,15 +21,14 @@ export class Restaurant extends BaseEntity {
menuColor?: string;
// --- مختصات جغرافیایی ---
@Property({ nullable: true })
@Property({ type: 'decimal', precision: 10, scale: 7, nullable: true })
latitude?: number;
@Property({ nullable: true })
@Property({ type: 'decimal', precision: 10, scale: 7, nullable: true })
longitude?: number;
// --- شعاع خدمات (مثلاً بر حسب متر یا کیلومتر) ---
@Property({ nullable: true })
serviceArea?: number;
@Property({ type: PolygonType, nullable: true })
serviceArea?: string;
// --- وضعیت‌ها ---
@Property({ default: true })