forked from wangziqi/gongxue-base
fix: harden financial transaction boundaries
This commit is contained in:
@@ -5,10 +5,12 @@ import {
|
||||
CreateDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
Index,
|
||||
} from 'typeorm';
|
||||
import { Room } from './room.entity';
|
||||
|
||||
@Entity('room_expenses')
|
||||
@Index(['importKey'], { unique: true })
|
||||
export class RoomExpense {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
@@ -34,6 +36,9 @@ export class RoomExpense {
|
||||
@Column({ name: 'recorded_by', nullable: true })
|
||||
recordedBy: number;
|
||||
|
||||
@Column({ name: 'import_key', type: 'varchar', length: 120, nullable: true, unique: true })
|
||||
importKey: string | null;
|
||||
|
||||
@Column({ type: 'varchar', length: 20, default: 'active' })
|
||||
status: 'active' | 'archived';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user