forked from wangziqi/gongxue-base
feat(task1): restructure directories for turborepo monorepo
- Move backend/ to apps/server/ via git mv - Move frontend/ to apps/admin/ via git mv - Create packages/typescript-config/ with base, nestjs, and react-vite presets
This commit is contained in:
36
apps/server/src/entities/bill-item.entity.ts
Normal file
36
apps/server/src/entities/bill-item.entity.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { Bill } from './bill.entity';
|
||||
|
||||
@Entity('bill_items')
|
||||
export class BillItem {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column({ name: 'bill_id' })
|
||||
billId: number;
|
||||
|
||||
@Column({ name: 'room_id', nullable: true })
|
||||
roomId: number;
|
||||
|
||||
@Column({ name: 'expense_type', length: 20, nullable: true })
|
||||
expenseType: string;
|
||||
|
||||
@Column({ length: 200, nullable: true })
|
||||
description: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
days: number;
|
||||
|
||||
@Column({ name: 'total_room_days', nullable: true })
|
||||
totalRoomDays: number;
|
||||
|
||||
@Column({ name: 'room_total_amount', type: 'decimal', precision: 10, scale: 2, nullable: true })
|
||||
roomTotalAmount: number;
|
||||
|
||||
@Column({ name: 'student_amount', type: 'decimal', precision: 10, scale: 2, nullable: true })
|
||||
studentAmount: number;
|
||||
|
||||
@ManyToOne(() => Bill, (b) => b.items)
|
||||
@JoinColumn({ name: 'bill_id' })
|
||||
bill: Bill;
|
||||
}
|
||||
Reference in New Issue
Block a user