parent
c757f282db
commit
a70efc8203
@ -0,0 +1,15 @@
|
||||
package dto
|
||||
|
||||
import "github.com/zggsong/gin-vue-demo/model"
|
||||
|
||||
type UserDto struct {
|
||||
Name string `json:"name"`
|
||||
Telephone string `json:"telephone"`
|
||||
}
|
||||
|
||||
func ToUserDto(user model.User) UserDto {
|
||||
return UserDto{
|
||||
Name: user.Name,
|
||||
Telephone: user.Telephone,
|
||||
}
|
||||
}
|
Loading…
Reference in new issue