entity bugs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Entity, Property, ManyToOne, Index, Enum } from '@mikro-orm/core';
|
||||
import { Entity, Property, ManyToOne, Index, Enum, PrimaryKey } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { User } from './user.entity';
|
||||
import { CreditTransactionType } from '../interface/credit';
|
||||
@@ -6,6 +6,9 @@ import { CreditTransactionType } from '../interface/credit';
|
||||
@Entity({ tableName: 'credit_transactions' })
|
||||
@Index({ properties: ['user'] })
|
||||
export class CreditTransaction extends BaseEntity {
|
||||
@PrimaryKey({ type: 'bigint', autoincrement: true })
|
||||
id: bigint
|
||||
|
||||
@ManyToOne(() => User)
|
||||
user!: User;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user