Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Company ¶
type Company struct { Id uint32 `gorm:"column:id;type:INT UNSIGNED;AUTO_INCREMENT;NOT NULL"` Name string `gorm:"column:name;type:VARCHAR(32);NOT NULL;index:company_idx_delete_name,unique,priority:1"` DeleteAt soft_delete.DeletedAt `gorm:"column:delete_at;type:INT UNSIGNED;NOT NULL;index:company_idx_delete_name,unique,priority:2"` CreateAt time.Time `gorm:"column:create_at;type:TIMESTAMP;NOT NULL"` UpdateAt time.Time `gorm:"column:update_at;type:TIMESTAMP;"` Size string `gorm:"column:size;type:VARCHAR(64);"` Market string `gorm:"column:market;type:VARCHAR(32);"` Source uint32 `gorm:"column:source;INT UNSIGNED;NOT NULL"` }
type CompanyModel ¶
type CompanyModel struct {
// contains filtered or unexported fields
}
func NewCompanyModel ¶
func NewCompanyModel(conn *gorm.DB) *CompanyModel
func (*CompanyModel) CreateCompany ¶
func (c *CompanyModel) CreateCompany(company *Company) error
func (*CompanyModel) DeleteCompanyById ¶
func (c *CompanyModel) DeleteCompanyById(id uint32) (err error)
func (*CompanyModel) FetchCompanies ¶
func (*CompanyModel) GetCompanyCount ¶
func (c *CompanyModel) GetCompanyCount() (count int64, err error)
type Model ¶
type Model struct {
*CompanyModel
}
Click to show internal directories.
Click to hide internal directories.