You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
543 B
Go

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)
}