package models type Org struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // 机构 ID Creator int64 `json:"creator"` // 创建者,即管理员用户的 id OrgName string `gorm:"column:org_name" json:"org_name"` OrgShortName string `gorm:"column:org_short_name" json:"org_short_name"` // 简称 OrgLogo string `gorm:"column:org_logo" json:"org_logo"` OrgIntroduction string `gorm:"column:org_introduction" json:"org_introduction"` Province int64 `json:"province"` // 省,代号,下面的市、区也一样 City int64 `json:"city"` District int64 `json:"district"` Address string `json:"address"` // 详细地址 Illness string `json:"illness"` // 服务病种 多个并用“,”隔开 Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用 CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间 ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间 OrgType int64 `gorm:"column:org_type" json:"org_type"` Evaluate float64 `gorm:"column:evaluate" json:"evaluate"` Comments int64 `gorm:"column:comments" json:"comments"` OperatingState int64 `gorm:"column:operating_state" json:"operating_state"` Claim int64 `gorm:"column:claim" json:"claim"` Telephone string `gorm:"column:telephone" json:"telephone"` BusinessWeek string `gorm:"column:business_week" json:"business_week"` BusinessTime string `gorm:"column:business_time" json:"business_time"` Gallery string `gorm:"column:gallery" json:"gallery"` ContactName string `gorm:"column:contact_name" json:"contact_name"` OrgGallery []*OrgGallery `gorm:"ForeignKey:OrgId" json:"org_gallery"` } func (Org) TableName() string { return "sgj_user_org" } type OrgGallery struct { ID int64 `gorm:"column:id" json:"id" form:"id"` Url string `gorm:"column:url" json:"url" form:"url"` Type int64 `gorm:"column:type" json:"type" form:"type"` OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"` UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"` Status int64 `gorm:"column:status" json:"status" form:"status"` Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"` Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"` } func (OrgGallery) TableName() string { return "sgj_user_org_gallery" } type OrgApp struct { Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // ID AppType int `gorm:"column:app_type" json:"app_type"` // 应用类型 1.病友经营;2.科普号;3.血透经营;4.慢病管理 Creator int `json:"creator"` // 创建者,即管理员用户的 id OrgId int `gorm:"column:org_id" json:"org_id"` OpenStatus int `gorm:"column:open_status" json:"open_status"` Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用 CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间 ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间 } func (OrgApp) TableName() string { return "sgj_user_org_app" } type OrgBan struct { ID int64 `gorm:"column:id" json:"id"` OrgId int64 `gorm:"column:org_id" json:"org_id"` Reason string `gorm:"column:reason" json:"reason"` Ctime int64 `gorm:"column:ctime" json:"ctime"` BanTime int64 `gorm:"column:ban_time" json:"ban_time"` Status int64 `gorm:"column:status" json:"status"` Mtime int64 `gorm:"column:mtime" json:"mtime"` } func (OrgBan) TableName() string { return "sgj_user_admin_org_ban" } type OrgType struct { ID int64 `gorm:"column:id" json:"id" form:"id"` Name string `gorm:"column:name" json:"name" form:"name"` ShortName string `gorm:"column:short_name" json:"short_name" form:"short_name"` Pid int64 `gorm:"column:pid" json:"pid" form:"pid"` Status int64 `gorm:"column:status" json:"status" form:"status"` CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"` UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"` SortNo int64 `gorm:"column:sort_no" json:"sort_no" form:"sort_no"` } func (OrgType) TableName() string { return "sgj_user_org_type" } type Illness struct { ID int64 `gorm:"column:id" json:"id"` IllnessName string `gorm:"column:illness_name" json:"illness_name"` Status int64 `gorm:"column:status" json:"status"` CreatedTime int64 `gorm:"column:created_time" json:"created_time"` UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time"` } func (Illness) TableName() string { return "sgj_user_illness" }