作者 tangxvhui
@@ -8,11 +8,12 @@ import ( @@ -8,11 +8,12 @@ import (
8 8
9 // StaffAssessCache 提交评估项内容缓存 9 // StaffAssessCache 提交评估项内容缓存
10 type StaffAssessCache struct { 10 type StaffAssessCache struct {
11 - tableName struct{} `comment:"评估项填写内容缓存" pg:"staff_assess_cache"`  
12 - Id int64 `comment:"ID" pg:",pk"`  
13 - AssessId int64 `comment:"评估项ID"`  
14 - AssessContent []domain.AssessContent `comment:"评估项提交数据"`  
15 - CreatedAt time.Time `comment:"创建时间"`  
16 - UpdatedAt time.Time `comment:"更新时间"`  
17 - DeletedAt *time.Time `comment:"删除时间"` 11 + tableName struct{} `comment:"评估项填写内容缓存" pg:"staff_assess_cache"`
  12 + Id int64 `comment:"ID" pg:",pk"`
  13 + AssessId int64 `comment:"评估项ID"`
  14 + AssessContent []domain.AssessContent `comment:"评估项提交数据"`
  15 + AssessTaskStages []domain.AssessTaskStage `comment:"任务项里程碑数据"`
  16 + CreatedAt time.Time `comment:"创建时间"`
  17 + UpdatedAt time.Time `comment:"更新时间"`
  18 + DeletedAt *time.Time `comment:"删除时间"`
18 } 19 }
@@ -24,23 +24,25 @@ func NewStaffAssessCacheRepository(transactionContext *pgTransaction.Transaction @@ -24,23 +24,25 @@ func NewStaffAssessCacheRepository(transactionContext *pgTransaction.Transaction
24 24
25 func (repo *StaffAssessCacheRepository) TransformToDomain(m *models.StaffAssessCache) domain.StaffAssessCache { 25 func (repo *StaffAssessCacheRepository) TransformToDomain(m *models.StaffAssessCache) domain.StaffAssessCache {
26 return domain.StaffAssessCache{ 26 return domain.StaffAssessCache{
27 - Id: m.Id,  
28 - AssessId: m.AssessId,  
29 - AssessContent: m.AssessContent,  
30 - CreatedAt: m.CreatedAt,  
31 - UpdatedAt: m.UpdatedAt,  
32 - DeletedAt: m.DeletedAt, 27 + Id: m.Id,
  28 + AssessId: m.AssessId,
  29 + AssessContent: m.AssessContent,
  30 + AssessTaskStages: m.AssessTaskStages,
  31 + CreatedAt: m.CreatedAt,
  32 + UpdatedAt: m.UpdatedAt,
  33 + DeletedAt: m.DeletedAt,
33 } 34 }
34 } 35 }
35 36
36 func (repo *StaffAssessCacheRepository) TransformToModel(d *domain.StaffAssessCache) models.StaffAssessCache { 37 func (repo *StaffAssessCacheRepository) TransformToModel(d *domain.StaffAssessCache) models.StaffAssessCache {
37 return models.StaffAssessCache{ 38 return models.StaffAssessCache{
38 - Id: d.Id,  
39 - AssessId: d.AssessId,  
40 - AssessContent: d.AssessContent,  
41 - CreatedAt: d.CreatedAt,  
42 - UpdatedAt: d.UpdatedAt,  
43 - DeletedAt: d.DeletedAt, 39 + Id: d.Id,
  40 + AssessId: d.AssessId,
  41 + AssessContent: d.AssessContent,
  42 + AssessTaskStages: d.AssessTaskStages,
  43 + CreatedAt: d.CreatedAt,
  44 + UpdatedAt: d.UpdatedAt,
  45 + DeletedAt: d.DeletedAt,
44 } 46 }
45 } 47 }
46 48