change entity names

This commit is contained in:
2026-02-08 09:18:20 +03:30
parent 6be6a66079
commit 9a7010dcea
180 changed files with 2751 additions and 2513 deletions
@@ -1,19 +1,19 @@
import { Entity, Index, Property, ManyToOne, Enum } from '@mikro-orm/core';
import { BaseEntity } from '../../../common/entities/base.entity';
import { BaseEntity } from '../../../../common/entities/base.entity';
import { User } from './user.entity';
import { WalletTransactionReason, WalletTransactionType } from '../interface/wallet';
import { Restaurant } from 'src/modules/restaurants/entities/restaurant.entity';
import { Shop } from ../../..shops/entities/shop.entity';
@Entity({ tableName: 'wallet_transactions' })
@Index({ properties: ['user', 'restaurant'] })
@Index({ properties: ['user', 'shop'] })
@Index({ properties: ['user'] })
@Index({ properties: ['restaurant'] })
@Index({ properties: ['shop'] })
export class WalletTransaction extends BaseEntity {
@ManyToOne(() => User)
user!: User;
@ManyToOne(() => Restaurant)
restaurant!: Restaurant;
@ManyToOne(() => Shop)
shop!: Shop;
@Property({ type: 'decimal', precision: 10, scale: 0 })
amount!: number;