cooperation_project.go
2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package transform
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/pg/models"
)
func TransformToCooperationProjectDomainModelFromPgModels(
cooperationProjectModel *models.CooperationProject,
cooperationMode *models.CooperationMode) (*domain.CooperationProject, error) {
return &domain.CooperationProject{
CooperationProjectId: cooperationProjectModel.CooperationProjectId,
CooperationProjectNumber: cooperationProjectModel.CooperationProjectNumber,
CooperationProjectDescription: cooperationProjectModel.CooperationProjectDescription,
CooperationProjectName: cooperationProjectModel.CooperationProjectName,
CooperationProjectPublishTime: cooperationProjectModel.CooperationProjectPublishTime,
CooperationProjectPublisher: cooperationProjectModel.CooperationProjectPublisher,
CooperationProjectSponsor: cooperationProjectModel.CooperationProjectSponsor,
Attachment: cooperationProjectModel.Attachment,
CooperationMode: &domain.CooperationMode{
CooperationModeId: cooperationMode.CooperationModeId,
CooperationModeNumber: cooperationMode.CooperationModeNumber,
CooperationModeName: cooperationMode.CooperationModeName,
Status: cooperationMode.Status,
Org: cooperationMode.Org,
Company: cooperationMode.Company,
Remarks: cooperationMode.Remarks,
Operator: cooperationMode.Operator,
OperateTime: cooperationMode.OperateTime,
UpdatedAt: cooperationMode.UpdatedAt,
DeletedAt: cooperationMode.DeletedAt,
CreatedAt: cooperationMode.CreatedAt,
},
Department: cooperationProjectModel.Department,
CooperationProjectUndertakerTypes: cooperationProjectModel.CooperationProjectUndertakerTypes,
Org: cooperationProjectModel.Org,
Company: cooperationProjectModel.Company,
Operator: cooperationProjectModel.Operator,
OperateTime: cooperationProjectModel.OperateTime,
Status: cooperationProjectModel.Status,
UpdatedAt: cooperationProjectModel.UpdatedAt,
DeletedAt: cooperationProjectModel.DeletedAt,
CreatedAt: cooperationProjectModel.CreatedAt,
}, nil
}