MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / apiFromDAO

Method apiFromDAO

internal/repository/role.go:169–186  ·  view source on GitHub ↗

apiFromDAO 将API DAO模型转换为领域模型

(api *dao.Api)

Source from the content-addressed store, hash-verified

167
168// apiFromDAO 将API DAO模型转换为领域模型
169func (r *roleRepository) apiFromDAO(api *dao.Api) *domain.Api {
170 if api == nil {
171 return nil
172 }
173 return &domain.Api{
174 ID: api.ID,
175 Name: api.Name,
176 Path: api.Path,
177 Method: api.Method,
178 Description: api.Description,
179 Version: api.Version,
180 Category: api.Category,
181 IsPublic: api.IsPublic,
182 CreateTime: api.CreateTime,
183 UpdateTime: api.UpdateTime,
184 IsDeleted: api.IsDeleted,
185 }
186}
187
188// menuFromDAO 将菜单DAO模型转换为领域模型
189func (r *roleRepository) menuFromDAO(menu *dao.Menu) *domain.Menu {

Callers 1

apisFromDAOMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected