|
@@ -23,15 +23,17 @@ type ImageSourceView struct {
|
|
|
Id int ` description:"Id"`
|
|
|
ImgName string `description:"图片名称"`
|
|
|
SrcUrl string `description:"图片资源"`
|
|
|
+ PermissionId int `description:"品种名称"`
|
|
|
PermissionName string `description:"品种名称"`
|
|
|
CreatedTime time.Time `description:"创建时间"`
|
|
|
}
|
|
|
|
|
|
func (i *ImageSource) ToView() (item *ImageSourceView, err error) {
|
|
|
item = &ImageSourceView{
|
|
|
- Id: i.Id,
|
|
|
- ImgName: i.ImgName,
|
|
|
- SrcUrl: i.SrcUrl,
|
|
|
+ Id: i.Id,
|
|
|
+ ImgName: i.ImgName,
|
|
|
+ SrcUrl: i.SrcUrl,
|
|
|
+ PermissionId: i.PermissionId,
|
|
|
}
|
|
|
name, err := GetPermissionNameById(i.PermissionId)
|
|
|
if err != nil {
|