add sms quantity

This commit is contained in:
2026-07-01 20:41:27 +03:30
parent d2838f0976
commit 816fa7a7fc
9 changed files with 91 additions and 6 deletions
@@ -0,0 +1,26 @@
import { Entity, Enum, Index, ManyToOne, Property } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { Restaurant } from './restaurant.entity';
import {
RestaurantCreditTransactionReason,
RestaurantCreditTransactionType,
} from '../interface/restaurant-credit-transaction.interface';
@Entity({ tableName: 'restaurant_credit_transactions' })
@Index({ properties: ['restaurant'] })
export class RestaurantCreditTransaction extends BaseEntity {
@ManyToOne(() => Restaurant)
restaurant!: Restaurant;
@Property({ type: 'decimal', precision: 10, scale: 0 })
amount!: number;
@Property({ type: 'decimal', precision: 10, scale: 0 })
balance!: number;
@Enum(() => RestaurantCreditTransactionType)
type!: RestaurantCreditTransactionType;
@Enum(() => RestaurantCreditTransactionReason)
reason!: RestaurantCreditTransactionReason;
}