新增简介审核-医生详情、简介审核-审核医生

This commit is contained in:
2024-02-19 10:28:11 +08:00
parent 3a81941cca
commit 6a4db0422e
9 changed files with 717 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
package model
import (
"gorm.io/gorm"
"hospital-admin-api/global"
"time"
)
type DoctorIntroductionRecord struct {
RecordId int64 `gorm:"column:record_id;type:bigint(19);primary_key;comment:主键id" json:"record_id"`
DoctorId int64 `gorm:"column:doctor_id;type:bigint(19);comment:医生id;NOT NULL" json:"doctor_id"`
IntroductionStatus int `gorm:"column:introduction_status;type:tinyint(1);default:1;comment:个人简介审核状态(0:未审核 1:审核通过 2:审核中 3:审核失败);NOT NULL" json:"introduction_status"`
Avatar string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avatar"`
BeGoodAt string `gorm:"column:be_good_at;type:text;comment:擅长" json:"be_good_at"`
BriefIntroduction string `gorm:"column:brief_introduction;type:text;comment:医生简介" json:"brief_introduction"`
ExpertiseIds string `gorm:"column:expertise_ids;type:varchar(1000);comment:专长id,逗号分隔" json:"expertise_ids"`
Model
UserDoctor *UserDoctor `gorm:"foreignKey:DoctorId;references:doctor_id" json:"user_doctor"` // 医生
}
func (m *DoctorIntroductionRecord) TableName() string {
return "gdxz_doctor_introduction_record"
}
func (m *DoctorIntroductionRecord) BeforeCreate(tx *gorm.DB) error {
if m.RecordId == 0 {
m.RecordId = global.Snowflake.Generate().Int64()
}
m.CreatedAt = LocalTime(time.Now())
tx.Statement.SetColumn("CreatedAt", m.CreatedAt)
m.UpdatedAt = LocalTime(time.Now())
tx.Statement.SetColumn("UpdatedAt", m.UpdatedAt)
return nil
}
+2
View File
@@ -22,6 +22,8 @@ type UserDoctor struct {
MultiPointStatus int `gorm:"column:multi_point_status;type:tinyint(1);default:0;comment:医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)" json:"multi_point_status"`
MultiPointTime LocalTime `gorm:"column:multi_point_time;type:datetime;comment:审核时间" json:"multi_point_time"`
MultiPointFailReason string `gorm:"column:multi_point_fail_reason;type:varchar(255);comment:多点执业认证失败原因" json:"multi_point_fail_reason"`
IntroductionStatus int `gorm:"column:introduction_status;type:tinyint(1);default:0;comment:个人简介审核状态(0:未审核 1:审核通过 2:审核中 3:审核失败)" json:"introduction_status"`
IntroductionTime LocalTime `gorm:"column:introduction_time;type:datetime;comment:审核时间" json:"introduction_time"`
IsBindBank int `gorm:"column:is_bind_bank;type:tinyint(1);default:0;comment:是否已绑定结算银行卡(0:否 1:是);NOT NULL" json:"is_bind_bank"`
IsRecommend int `gorm:"column:is_recommend;type:tinyint(1);default:0;comment:是否首页推荐(0:否 1:是)" json:"is_recommend"`
Avatar string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avatar"`