1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package dto
- import (
- "Medical_ERP/common/dto"
- common "Medical_ERP/common/model"
- "Medical_ERP/models"
- )
- // MedicineImgPageReq 列表或者搜索使用结构体
- type MedicineImgPageReq struct {
- dto.Pagination `search:"-"`
- Product string `json:"product" search:"type:contains;column:product;table:medicine_img" example:""` // 产品
- Enterprise string `json:"enterprise" search:"type:contains;column:enterprise;table:medicine_img" example:""` // 生产企业
- Spec string `json:"spec" search:"type:contains;column:spec;table:medicine_img" example:""` // 规格
- BatchNumber string `json:"batchNumber" search:"type:contains;column:batch_number;table:medicine_img" example:""` // 批号
- }
- func (m *MedicineImgPageReq) GetNeedSearch() interface{} {
- return *m
- }
- // MedicineImgUpdateReq 改使用的结构体
- type MedicineImgUpdateReq struct {
- Id int `json:"id" example:"1"`
- Img string `json:"img" example:"图片"` // 图片
- common.ControlBy `swaggerignore:"true"`
- }
- func (s *MedicineImgUpdateReq) Generate(model *models.MedicineImg) {
- model.Id = s.Id
- model.Img = s.Img
- if s.ControlBy.UpdateBy != 0 {
- model.UpdateBy = s.UpdateBy
- }
- if s.ControlBy.CreateBy != 0 {
- model.CreateBy = s.CreateBy
- }
- }
- func (s *MedicineImgUpdateReq) GetId() interface{} {
- return s.Id
- }
|