Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompanyPayload ¶
type CompanyPayload struct { Name string `json:"name" shema:"name" validate:"required,gt=0,max=255"` Code string `json:"code" shema:"code" validate:"required,gt=0,max=255"` Country string `json:"country" shema:"country" validate:"required,iso3166_1_alpha2"` Website string `json:"website" shema:"website" validate:"required,fqdn"` Phone string `json:"phone" shema:"phone" validate:"required,e164"` }
CompanyPayload is a data structure used to decode incoming company data.
func (*CompanyPayload) ToCompany ¶
func (c *CompanyPayload) ToCompany() models.Company
ToCompany creates a new Company from the CompanyPayload.
Click to show internal directories.
Click to hide internal directories.