作者 tangxvhui
... ... @@ -8,11 +8,12 @@ import (
// StaffAssessCache 提交评估项内容缓存
type StaffAssessCache struct {
tableName struct{} `comment:"评估项填写内容缓存" pg:"staff_assess_cache"`
Id int64 `comment:"ID" pg:",pk"`
AssessId int64 `comment:"评估项ID"`
AssessContent []domain.AssessContent `comment:"评估项提交数据"`
CreatedAt time.Time `comment:"创建时间"`
UpdatedAt time.Time `comment:"更新时间"`
DeletedAt *time.Time `comment:"删除时间"`
tableName struct{} `comment:"评估项填写内容缓存" pg:"staff_assess_cache"`
Id int64 `comment:"ID" pg:",pk"`
AssessId int64 `comment:"评估项ID"`
AssessContent []domain.AssessContent `comment:"评估项提交数据"`
AssessTaskStages []domain.AssessTaskStage `comment:"任务项里程碑数据"`
CreatedAt time.Time `comment:"创建时间"`
UpdatedAt time.Time `comment:"更新时间"`
DeletedAt *time.Time `comment:"删除时间"`
}
... ...
... ... @@ -24,23 +24,25 @@ func NewStaffAssessCacheRepository(transactionContext *pgTransaction.Transaction
func (repo *StaffAssessCacheRepository) TransformToDomain(m *models.StaffAssessCache) domain.StaffAssessCache {
return domain.StaffAssessCache{
Id: m.Id,
AssessId: m.AssessId,
AssessContent: m.AssessContent,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,
DeletedAt: m.DeletedAt,
Id: m.Id,
AssessId: m.AssessId,
AssessContent: m.AssessContent,
AssessTaskStages: m.AssessTaskStages,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,
DeletedAt: m.DeletedAt,
}
}
func (repo *StaffAssessCacheRepository) TransformToModel(d *domain.StaffAssessCache) models.StaffAssessCache {
return models.StaffAssessCache{
Id: d.Id,
AssessId: d.AssessId,
AssessContent: d.AssessContent,
CreatedAt: d.CreatedAt,
UpdatedAt: d.UpdatedAt,
DeletedAt: d.DeletedAt,
Id: d.Id,
AssessId: d.AssessId,
AssessContent: d.AssessContent,
AssessTaskStages: d.AssessTaskStages,
CreatedAt: d.CreatedAt,
UpdatedAt: d.UpdatedAt,
DeletedAt: d.DeletedAt,
}
}
... ...