MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / FromModel

Function FromModel

module/publish/dto/out.go:24–47  ·  view source on GitHub ↗
(m *publish.Publish, versionRemark string)

Source from the content-addressed store, hash-verified

22}
23
24func FromModel(m *publish.Publish, versionRemark string) *Publish {
25
26 p := &Publish{
27 Id: m.Id,
28 Version: m.Version,
29 Remark: m.Remark,
30 VersionRemark: versionRemark,
31 Comments: m.Comments,
32 Service: auto.UUID(m.Service),
33 Applicant: auto.UUID(m.Applicant),
34 Release: auto.UUID(m.Release),
35
36 Status: m.Status,
37 ApplyTIme: auto.TimeLabel(m.ApplyTime),
38 ApproveTime: auto.TimeLabel(m.ApproveTime),
39 }
40 if m.Approver != "" {
41 p.Approver = auto.UUIDP(m.Approver)
42 }
43 if m.Previous != "" {
44 p.Previous = auto.UUIDP(m.Previous)
45 }
46 return p
47}
48
49type PublishDetail struct {
50 *Publish

Callers 3

ApplyMethod · 0.92
ListMethod · 0.92
DetailMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected