修改了部分数据结构

This commit is contained in:
2025-01-08 14:47:34 +08:00
parent 069c972327
commit dc65bd9e09
5 changed files with 3 additions and 12 deletions
+1
View File
@@ -9,6 +9,7 @@ import (
// BasicHospital 基础数据-医院
type BasicHospital struct {
HospitalId int64 `gorm:"column:hospital_id;type:bigint(19);primary_key;comment:主键id" json:"hospital_id"`
HospitalIden string `gorm:"column:hospital_iden;type:varchar(50);comment:app唯一标识" json:"hospital_iden"`
HospitalName string `gorm:"column:hospital_name;type:varchar(100);comment:医院名称" json:"hospital_name"`
Source int `gorm:"column:source;type:tinyint(1);comment:来源(2:肝胆相照 3:佳动例);NOT NULL" json:"source"`
HospitalLevel string `gorm:"column:hospital_level;type:varchar(20);comment:医院等级" json:"hospital_level"`
+1 -1
View File
@@ -16,7 +16,7 @@ type CasePlatform struct {
JoinWhiteNum int `gorm:"column:join_white_num;type:int(5);default:0;comment:白名单参加人数" json:"join_white_num"`
MessageNum int `gorm:"column:message_num;type:int(5);default:0;comment:留言人数" json:"message_num"`
Model
ProjectPlatform *ProjectPlatform `gorm:"foreignKey:PlatformId;references:platform_id" json:"project_platform"`
Platform *Platform `gorm:"foreignKey:PlatformId;references:platform_id" json:"platform"`
}
func (m *CasePlatform) TableName() string {
-2
View File
@@ -12,8 +12,6 @@ type Project struct {
ProjectName string `gorm:"column:project_name;type:varchar(255);comment:项目名称" json:"project_name"`
ProjectStatus int `gorm:"column:project_status;type:tinyint(1);comment:项目状态(0:无效 1:正常)" json:"project_status"`
ProjectImage string `gorm:"column:project_image;type:varchar(255);comment:项目背景图" json:"project_image"`
IsLimitNum int `gorm:"column:is_limit_num;type:tinyint(1);default:0;comment:是否限制参加数量(0:否 1:是)" json:"is_limit_num"`
MaxJoinNum int `gorm:"column:max_join_num;type:int(5);default:0;comment:医生最多可参加数量" json:"max_join_num"`
Model
Case []*Case `gorm:"foreignKey:ProjectId;references:project_id" json:"case"`
ProjectPlatform []*ProjectPlatform `gorm:"foreignKey:ProjectId;references:project_id" json:"project_platform"`