model

package module
v0.0.0-...-3114970 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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"`
}

func (Company) TableName

func (Company) TableName() string

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 (c *CompanyModel) FetchCompanies(name string, scopes orm.Scopes) ([]*Company, error)

func (*CompanyModel) GetCompanyCount

func (c *CompanyModel) GetCompanyCount() (count int64, err error)

type Model

type Model struct {
	*CompanyModel
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL