entity bugs

This commit is contained in:
2026-01-14 15:19:18 +03:30
parent 209a4fc723
commit aed4a1b333
12 changed files with 35 additions and 24 deletions
@@ -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;