99 *
1010 * 版权所有 (c) 2022-2025 锋楪技术团队。保留所有权利。
1111 *
12- * 本软件是“ 按原样” 提供的,没有任何形式的明示或暗示的保证,包括但不限于
12+ * 本软件是" 按原样" 提供的,没有任何形式的明示或暗示的保证,包括但不限于
1313 * 对适销性、特定用途的适用性和非侵权性的暗示保证。在任何情况下,
1414 * 作者或版权持有人均不承担因软件或软件的使用或其他交易而产生的、
1515 * 由此引起的或以任何方式与此软件有关的任何索赔、损害或其他责任。
@@ -34,35 +34,43 @@ import (
3434
3535// CsCourseLibrary 课程库表
3636type CsCourseLibrary struct {
37- CourseLibraryUUID string `gorm:"type:char(32);primaryKey;comment:课程库主键"`
38- ID string `gorm:"type:varchar(32);unique;not null;comment:课程编号"`
39- Name string `gorm:"type:varchar(32);unique;not null;comment:课程库名称"`
40- EnglishName * string `gorm:"type:varchar(128);not null;comment:课程英文名称"`
41- Category * string `gorm:"type:char(32);not null;comment:课程类别"`
42- Property * string `gorm:"type:char(32);not null;comment:课程属性"`
43- Type string `gorm:"type:char(32);not null;comment:课程类型"`
44- Nature * string `gorm:"type:char(32);not null;comment:课程性质"`
45- Department string `gorm:"type:char(32);not null;comment:开课学院"`
46- IsEnabled bool `gorm:"type:tinyint(1);default:1;not null;comment:是否启用"`
47- TotalHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:总学时"`
48- WeekHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:周学时"`
49- TheoryHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:理论学时"`
50- ExperimentHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:实验学时"`
51- PracticeHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:实践学时"`
52- ComputerHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:上机学时"`
53- OtherHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:其他学时"`
54- Credit float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:学分"`
55- Description string `gorm:"type:text;comment:课程库描述"`
56- EditUser * string `gorm:"type:char(32);comment:编辑人"`
57- CreatedAt time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP;not null;comment:创建时间"`
58- UpdatedAt time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;not null;comment:更新时间"`
37+ CourseLibraryUUID string `gorm:"type:char(32);primaryKey;comment:课程库主键"`
38+ ID string `gorm:"type:varchar(32);unique;not null;comment:课程编号"`
39+ Name string `gorm:"type:varchar(32);unique;not null;comment:课程库名称"`
40+ EnglishName * string `gorm:"type:varchar(128);not null;comment:课程英文名称"`
41+ Category * string `gorm:"type:char(32);not null;comment:课程类别"`
42+ Property * string `gorm:"type:char(32);not null;comment:课程属性"`
43+ Type string `gorm:"type:char(32);not null;comment:课程类型"`
44+ Nature * string `gorm:"type:char(32);not null;comment:课程性质"`
45+ Department string `gorm:"type:char(32);not null;comment:开课学院"`
46+ IsEnabled bool `gorm:"type:tinyint(1);default:1;not null;comment:是否启用"`
47+ TotalHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:总学时"`
48+ WeekHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:周学时"`
49+ TheoryHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:理论学时"`
50+ ExperimentHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:实验学时"`
51+ PracticeHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:实践学时"`
52+ ComputerHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:上机学时"`
53+ OtherHours float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:其他学时"`
54+ Credit float64 `gorm:"type:decimal(10,2);default:0.00;not null;comment:学分"`
55+ TheoryClassroomType * string `gorm:"type:char(32);comment:理论课教室类型"`
56+ ExperimentClassroomType * string `gorm:"type:char(32);comment:实验课教室类型"`
57+ PracticeClassroomType * string `gorm:"type:char(32);comment:实践课教室类型"`
58+ ComputerClassroomType * string `gorm:"type:char(32);comment:上机课教室类型"`
59+ Description string `gorm:"type:text;comment:课程库描述"`
60+ EditUser * string `gorm:"type:char(32);comment:编辑人"`
61+ CreatedAt time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP;not null;comment:创建时间"`
62+ UpdatedAt time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;not null;comment:更新时间"`
5963
6064 // 外键关联
61- CategoryRel CsCourseCategory `gorm:"foreignKey:Category;references:CourseCategoryUUID"`
62- PropertyRel CsCourseProperty `gorm:"foreignKey:Property;references:CoursePropertyUUID"`
63- TypeRel CsCourseType `gorm:"foreignKey:Type;references:CourseTypeUUID"`
64- NatureRel CsCourseNature `gorm:"foreignKey:Nature;references:CourseNatureUUID"`
65- DepartmentRel CsDepartment `gorm:"foreignKey:Department;references:DepartmentUUID"`
65+ CategoryRel CsCourseCategory `gorm:"foreignKey:Category;references:CourseCategoryUUID"`
66+ PropertyRel CsCourseProperty `gorm:"foreignKey:Property;references:CoursePropertyUUID"`
67+ TypeRel CsCourseType `gorm:"foreignKey:Type;references:CourseTypeUUID"`
68+ NatureRel CsCourseNature `gorm:"foreignKey:Nature;references:CourseNatureUUID"`
69+ DepartmentRel CsDepartment `gorm:"foreignKey:Department;references:DepartmentUUID"`
70+ TheoryClassroomTypeRel CsClassroomType `gorm:"foreignKey:TheoryClassroomType;references:ClassTypeUUID"`
71+ ExperimentClassroomTypeRel CsClassroomType `gorm:"foreignKey:ExperimentClassroomType;references:ClassTypeUUID"`
72+ PracticeClassroomTypeRel CsClassroomType `gorm:"foreignKey:PracticeClassroomType;references:ClassTypeUUID"`
73+ ComputerClassroomTypeRel CsClassroomType `gorm:"foreignKey:ComputerClassroomType;references:ClassTypeUUID"`
6674}
6775
6876// TableName 指定表名
0 commit comments