Files
gongxue-base/apps/server/src/entities/learning-record.entity.ts
wangziqi f50301148d fix(correctness): 并发/事务/实体/时区/状态一致性修复
由 OCR(open-codereview.ai,deepseek-v4-flash)审查驱动修复:
- wallets 原子扣款防 double-spend;refund 条件更新幂等;findTransactions 分页
- financial/imports/occupancies/attendance 事务与 advisory lock;重复生成/提交幂等
- 矛盾校验器、日期区间、实体双映射/DECIMAL/nullable、时区统一(china-time)
- rbac-seed 防重激活、exam 权限恢复、状态一致性、路由顺序、N+1/IN 分块等性能项

Reviewed-by: OCR (open-codereview.ai)
2026-08-09 21:29:54 +08:00

42 lines
931 B
TypeScript

import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from 'typeorm';
@Entity('learning_records')
export class LearningRecord {
@PrimaryGeneratedColumn()
id: number;
@Column({ name: 'student_id', type: 'integer' })
studentId: number;
@Column({ name: 'record_date', type: 'date', nullable: true })
recordDate: string;
@Column({ name: 'record_type', length: 50, nullable: true })
recordType: string;
@Column({ type: 'text', nullable: true })
content: string;
@Column({ name: 'follow_up_method', length: 50, nullable: true })
followUpMethod: string;
@Column({ name: 'next_step', type: 'text', nullable: true })
nextStep: string;
@Column({ type: 'varchar', length: 20, default: 'active' })
status: 'active' | 'archived';
@CreateDateColumn({ name: 'created_at' })
createdAt: Date;
@UpdateDateColumn({ name: 'updated_at' })
updatedAt: Date;
}