Bläddra i källkod

♻️ refactor(submission): modify user_id field type in SubmissionRecords entity

- add unsigned constraint to user_id column to ensure positive integer values
- maintain nullable property and comment while improving data type accuracy
yourname 6 månader sedan
förälder
incheckning
766d5e5990
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      src/server/modules/submission/submission-records.entity.ts

+ 1 - 1
src/server/modules/submission/submission-records.entity.ts

@@ -9,7 +9,7 @@ export class SubmissionRecords {
   @Column({ name: 'classroom_no', type: 'varchar', length: 255, nullable: true, comment: '教室号' })
   @Column({ name: 'classroom_no', type: 'varchar', length: 255, nullable: true, comment: '教室号' })
   classroomNo!: string | null;
   classroomNo!: string | null;
 
 
-  @Column({ name: 'user_id', type: 'int', nullable: true, comment: '用户id' })
+  @Column({ name: 'user_id', type: 'int', unsigned: true, nullable: true, comment: '用户id' })
   userId!: number | null;
   userId!: number | null;
 
 
   // 单向关联定义
   // 单向关联定义