change entity names
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user