package model import "iot_manager_service/app/multimedia/dao" const ( LibraryTypeVideo = 1 LibraryTypeImage = 2 LibraryTypeVideoStr = "视频" LibraryTypeImageStr = "图片" ) func DaoToModel(library dao.Library) LibraryDetail { typeName := LibraryTypeVideoStr if library.LibType == LibraryTypeImage { typeName = LibraryTypeImageStr } return LibraryDetail{ Library: library, TypeName: typeName, } } type LibraryDetail struct { dao.Library TypeName string `json:"typeName"` //素材类型(中文) 视频 图片 } type RsqLibraryList struct { Records []LibraryDetail `json:"records"` //记录列表 Current int `json:"current"` //当前分页 Size int `json:"size"` //每页数量 Pages int `json:"pages"` //总页数 Total int `json:"total"` //总数 }