Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Company ¶
type Company struct { *CompanyData // contains filtered or unexported fields }
func NewCompany ¶
func NewCompany(data *CompanyData, repo *repo.RepoCompany) (*Company, error)
func NewCompanyEmpty ¶
func NewCompanyEmpty(repo *repo.RepoCompany) (*Company, error)
func (*Company) RepoDeleteCompany ¶
func (*Company) RepoGetCompanies ¶
func (c *Company) RepoGetCompanies() ([]CompanyData, error)
func (*Company) RepoGetCompanyByID ¶
func (c *Company) RepoGetCompanyByID(id uint) (*CompanyData, error)
func (*Company) RepoNewCompany ¶
func (*Company) RepoUpdateCompany ¶
RepoUpdateCompany should update the entity.
type CompanyData ¶
type CompanyData struct { gorm.Model Code string `json:"code"` Name string `json:"name"` Country string `json:"country"` Website string `json:"website"` Phone string `json:"phone"` // for supporting +40 type }
func NewCompanyData ¶
func NewCompanyData(code, name, country, website, phone string) (*CompanyData, error)
func (CompanyData) IsValid ¶
func (c CompanyData) IsValid() error
Click to show internal directories.
Click to hide internal directories.