// Package dto ----------------------------- // @file : artwork_ext.go // @author : JJXu // @contact : wavingbear@163.com // @time : 2023/2/28 10:35 // ------------------------------------------- package asArtwork import ( "github.com/fonchain_enterprise/fonchain-main/api/artwork" ) type GetExtDataListRequest struct { ArtistUid string `json:"artistUid"` //可选 艺术家id ArtworkName string `json:"artworkName"` //可选 画作名称 AuditStatus int64 `json:"auditStatus"` //可选 审批状态 Page int64 `json:"page"` PageSize int64 `json:"pageSize"` } type SaveArtworkExtDataRequest struct { Id int32 `json:"id"` ArtType int32 `json:"artType"` ArtTitle int32 `json:"artTitle"` ArtStyle int32 `json:"artStyle"` Color int32 `json:"color"` PenTechniques string `json:"penTechniques"` ArtIdea string `json:"artIdea"` ExpressIdea string `json:"expressIdea"` ArtStory string `json:"artStory"` FirstPublish string `json:"firstPublish"` FirstPublishImg string `json:"firstPublishImg"` FirstName string `json:"firstName"` FirstNameImg string `json:"firstNameImg"` ThirdComment string `json:"thirdComment"` ArtworkUuid string `json:"artworkUid"` } func (s SaveArtworkExtDataRequest) ConvertProtoRequest() *artwork.UpdateExtDataRequest { return &artwork.UpdateExtDataRequest{ Id: s.Id, ArtType: s.ArtType, ArtTitle: s.ArtTitle, ArtStyle: s.ArtStyle, Color: s.Color, PenTechniques: s.PenTechniques, ArtIdea: s.ArtIdea, ExpressIdea: s.ExpressIdea, ArtStory: s.ArtStory, FirstPublish: s.FirstPublish, FirstPublishImg: s.FirstPublishImg, FirstName: s.FirstName, FirstNameImg: s.FirstNameImg, ThirdComment: s.ThirdComment, ArtworkUuid: s.ArtworkUuid, } } type ArtworkExtInfo struct { Id int32 `json:"id"` ArtType int32 `json:"artType"` ArtTitle int32 `json:"artTitle"` ArtStyle int32 `json:"artStyle"` Color int32 `json:"color"` PenTechniques string `json:"penTechniques"` ArtIdea string `json:"artIdea"` ExpressIdea string `json:"expressIdea"` ArtStory string `json:"artStory"` FirstPublish string `json:"firstPublish"` FirstPublishImg string `json:"firstPublish_img"` FirstName string `json:"firstName"` FirstNameImg string `json:"firstName_img"` ThirdComment string `json:"thirdComment"` ArtworkUuid string `json:"artworkUid"` } func (a *ArtworkExtInfo) Convert(protoData *artwork.UpdateExtDataRequest) { if protoData == nil { return } a.Id = protoData.Id a.ArtType = protoData.ArtType a.ArtTitle = protoData.ArtTitle a.ArtStyle = protoData.ArtStyle a.Color = protoData.Color a.PenTechniques = protoData.PenTechniques a.ArtIdea = protoData.ArtIdea a.ExpressIdea = protoData.ExpressIdea a.ArtStory = protoData.ArtStory a.FirstPublish = protoData.FirstPublish a.FirstPublishImg = protoData.FirstPublishImg a.FirstName = protoData.FirstName a.FirstNameImg = protoData.FirstNameImg a.ThirdComment = protoData.ThirdComment a.ArtworkUuid = protoData.ArtworkUuid }