remove graph
This commit is contained in:
@@ -2,25 +2,20 @@ import { Entity, ManyToOne, Unique, Property } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { Restaurant } from '../../restaurants/entities/restaurant.entity';
|
||||
import { PaymentMethod } from './payment-method.entity';
|
||||
import { ObjectType, Field } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
@Entity({ tableName: 'restaurant_payment_methods' })
|
||||
@Unique({ properties: ['restaurant', 'paymentMethod'] })
|
||||
export class RestaurantPaymentMethod extends BaseEntity {
|
||||
@ManyToOne(() => Restaurant)
|
||||
restaurant!: Restaurant;
|
||||
|
||||
@Field(() => PaymentMethod, { nullable: true })
|
||||
@ManyToOne(() => PaymentMethod)
|
||||
paymentMethod!: PaymentMethod;
|
||||
|
||||
// Add merchant ID for payment gateway providers (e.g., ZarinPal)
|
||||
@Field({ nullable: true })
|
||||
@Property({ nullable: true })
|
||||
merchantId?: string;
|
||||
|
||||
@Field({ nullable: true })
|
||||
@Property({ type: 'boolean', default: true })
|
||||
isActive: boolean = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user