package handler import ( "google.golang.org/protobuf/types/known/timestamppb" "hilo/api/service/country" "hilo/app/service/country/internal/model" ) func CountryModelToShortNameRep(m *model.ResCountry) *country.GetCountryByShortNameRep { return &country.GetCountryByShortNameRep{ Data: &country.CountryModel{ Id: m.Id, Name: m.Name, ShortName: m.ShortName, Code: m.Code, Icon: m.Icon, Icon2: m.Icon2, Lang: m.Lang, IsCommon: int32(m.IsCommon), IsDefault: int32(m.IsDefault), Status: int32(m.Status), CreatedTime: timestamppb.New(m.CreatedTime), UpdatedTime: timestamppb.New(m.UpdatedTime), StandardShortName: m.StandardShortName, }, } }