cooperation_application.go
3.0 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
46
47
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 TransformToCooperationApplicationDomainModelFromPgModels(
cooperationApplicationModel *models.CooperationApplication,
cooperationProject *models.CooperationProject) (*domain.CooperationApplication, error) {
return &domain.CooperationApplication{
CooperationApplicationId: cooperationApplicationModel.CooperationApplicationId,
CooperationApplicationApplicant: cooperationApplicationModel.CooperationApplicationApplicant,
CooperationApplicationAttachment: cooperationApplicationModel.CooperationApplicationAttachment,
CooperationApplicationDescription: cooperationApplicationModel.CooperationApplicationDescription,
CooperationApplicationStatus: cooperationApplicationModel.CooperationApplicationStatus,
CooperationApplicationVerifier: cooperationApplicationModel.CooperationApplicationVerifier,
CooperationApplicationVerifyDescription: cooperationApplicationModel.CooperationApplicationVerifyDescription,
CooperationApplicationVerifyTime: cooperationApplicationModel.CooperationApplicationVerifyTime,
CooperationApplyTime: cooperationApplicationModel.CooperationApplyTime,
CooperationProject: &domain.CooperationProject{
CooperationProjectNumber: cooperationProject.CooperationProjectNumber,
CooperationProjectDescription: cooperationProject.CooperationProjectDescription,
CooperationProjectName: cooperationProject.CooperationProjectName,
CooperationProjectPublishTime: cooperationProject.CooperationProjectPublishTime,
CooperationProjectPublisher: cooperationProject.CooperationProjectPublisher,
CooperationProjectSponsor: cooperationProject.CooperationProjectSponsor,
Department: cooperationProject.Department,
CooperationProjectUndertakerTypes: cooperationProject.CooperationProjectUndertakerTypes,
Org: cooperationProject.Org,
Attachment: cooperationProject.Attachment,
Company: cooperationProject.Company,
Operator: cooperationProject.Operator,
OperateTime: cooperationProject.OperateTime,
Status: cooperationProject.Status,
UpdatedAt: cooperationProject.UpdatedAt,
DeletedAt: cooperationProject.DeletedAt,
CreatedAt: cooperationProject.CreatedAt,
},
Org: cooperationApplicationModel.Org,
IsCanceled: cooperationApplicationModel.IsCanceled,
Company: cooperationApplicationModel.Company,
CreatedAt: cooperationApplicationModel.CreatedAt,
DeletedAt: cooperationApplicationModel.DeletedAt,
UpdatedAt: cooperationApplicationModel.UpdatedAt,
}, nil
}