lib/app/domain-helpers.go

21 lines
457 B
Go
Raw Normal View History

2021-01-14 06:36:35 +00:00
package app
import "code.tnxs.net/taxnexus/lib/api/geo/geo_models"
2021-01-17 21:49:00 +00:00
func UnMarshalDomain(swag *geo_models.Domain) *Domain {
2021-01-14 06:36:35 +00:00
return &Domain{
Description: swag.Description,
Active: swag.Active,
ID: swag.ID,
Name: swag.Name,
}
}
2021-01-17 21:49:00 +00:00
func (obj *Domain) MarshalToSwagger() *geo_models.Domain {
2021-01-14 06:36:35 +00:00
return &geo_models.Domain{
ID: obj.ID,
Active: obj.Active,
Description: obj.Description,
Name: obj.Name,
}
}