shipment methods

This commit is contained in:
2025-11-23 16:16:10 +03:30
parent ff97d509aa
commit 08e2da0e5c
2 changed files with 6 additions and 4 deletions
@@ -1,10 +1,11 @@
import { Entity, ManyToOne, Property, Unique } from '@mikro-orm/core';
import { Restaurant } from './restaurant.entity';
import { ShipmentMethod } from '../../shipments/entities/shipment-method.entity';
import { BaseEntity } from 'src/common/entities/base.entity';
@Entity({ tableName: 'restaurant_shipment_methods' })
@Unique({ properties: ['restaurant', 'shipmentMethod'] })
export class RestaurantShipmentMethod {
export class RestaurantShipmentMethod extends BaseEntity {
@ManyToOne(() => Restaurant, { primary: true })
restaurant!: Restaurant;