package article import ( "cls/internal/domain/article" "cls/pkg/reflect" ) type ArticleResp struct { } func NewArticleResp() *ArticleResp { return &ArticleResp{} } func (resp *ArticleResp) ModelToDto(article *article.LianV1Article) (*ArticleDto, error) { articleDto := NewArticleDto() return articleDto, reflect.ParseValueByTag(article, articleDto) } func (resp *ArticleResp) DtoToModel(articleDto *ArticleDto) (*article.LianV1Article, error) { ar := article.NewLianV1Article() return ar, reflect.ParseValueByTag(articleDto, ar) }