up
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
import { Entity, Property } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
|
||||
@Entity({ tableName: 'restaurants' })
|
||||
export class Restaurant extends BaseEntity {
|
||||
// --- اطلاعات پایه ---
|
||||
@Property()
|
||||
name!: string;
|
||||
|
||||
@Property({ unique: true })
|
||||
slug!: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
logo?: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
address?: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
menuColor?: string;
|
||||
|
||||
// --- مختصات جغرافیایی ---
|
||||
@Property({ nullable: true })
|
||||
latitude?: number;
|
||||
|
||||
@Property({ nullable: true })
|
||||
longitude?: number;
|
||||
|
||||
// --- شعاع خدمات (مثلاً بر حسب متر یا کیلومتر) ---
|
||||
@Property({ nullable: true })
|
||||
serviceArea?: number;
|
||||
|
||||
// --- وضعیتها ---
|
||||
@Property({ default: true })
|
||||
isActive: boolean = true;
|
||||
|
||||
@Property({ nullable: true })
|
||||
establishedYear?: number;
|
||||
|
||||
@Property({ nullable: true })
|
||||
phoneNumber?: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
instagram?: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
telegram?: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
whatsapp?: string;
|
||||
|
||||
// --- توضیحات ---
|
||||
@Property({ type: 'text', nullable: true })
|
||||
description?: string;
|
||||
|
||||
// --- سئو ---
|
||||
@Property({ nullable: true })
|
||||
seoTitle?: string;
|
||||
|
||||
@Property({ nullable: true, type: 'text' })
|
||||
seoDescription?: string;
|
||||
|
||||
@Property({ nullable: true, type: 'json' })
|
||||
tagNames?: string[];
|
||||
|
||||
// --- مالیات یا VAT ---
|
||||
@Property({ type: 'decimal', default: 0 })
|
||||
vat?: number = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user