作者 Your Name

添加 权重字段

... ... @@ -1055,6 +1055,7 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a
Value: "",
ReteResult: "",
CreatedAt: nowTime,
Weight: v.Weight,
UpdatedAt: nowTime,
DeletedAt: nil,
// Rule: ,
... ...
... ... @@ -15,6 +15,7 @@ type StaffAssessContent struct {
Value string `json:"value"` //评估填写的值
ReteResult string `json:"reteResult"` //评估的结果
Rule EvaluationRule `json:"rule"` //评估的选项规则
Weight int `json:"weight" ` //"权重"
CreatedAt time.Time `json:"createdAt"` //数据创建时间
UpdatedAt time.Time `json:"updatedAt"` //数据更新时间
DeletedAt *time.Time `json:"deletedAt"`
... ...
... ... @@ -20,6 +20,7 @@ type StaffAssessContent struct {
ReteResult string //评估的结果
Rule domain.EvaluationRule
Remark []domain.AssessContemtRemark
Weight int //权重
CreatedAt time.Time //数据创建时间
UpdatedAt time.Time //数据更新时间
DeletedAt *time.Time
... ...
... ... @@ -34,6 +34,7 @@ func (repo *StaffAssessContentRepository) TransformToDomain(d *models.StaffAsses
Value: d.Value,
ReteResult: d.ReteResult,
Rule: d.Rule,
Weight: d.Weight,
CreatedAt: d.CreatedAt,
UpdatedAt: d.UpdatedAt,
DeletedAt: nil,
... ... @@ -55,6 +56,7 @@ func (repo *StaffAssessContentRepository) Save(d *domain.StaffAssessContent) (*d
Rule: d.Rule,
CreatedAt: d.CreatedAt,
UpdatedAt: d.UpdatedAt,
Weight: d.Weight,
DeletedAt: nil,
}
tx := repo.transactionContext.PgTx
... ...