package model type Company struct { ID int `json:"id" gorm:"type:bigint(20);not null"` Name string `json:"name" gorm:"type:varchar(128);not null"` LogoUrl string `json:"logo_url" gorm:"type:varchar(128);not null"` CertificateUrl string `json:"certificate_url" gorm:"type:varchar(128);not null"` CreatorId string `json:"creator_id" gorm:"type:varchar(128);not null"` CreatorName string `json:"creator_name" gorm:"type:varchar(128);not null"` CreatedAt Time `json:"created_at" gorm:"column:create_time;type:datetime default CURRENT_TIMESTAMP"` UpdatedAt Time `json:"updated_at" gorm:"column:update_time;type:datetime default CURRENT_TIMESTAMP"` } type CompanyCreateRequest struct { ID int `json:"id" gorm:"type:bigint(20);not null"` Name string `json:"name" gorm:"type:varchar(128);not null"` LogoUrl string `json:"logo_url" gorm:"type:varchar(128);not null"` CertificateUrl string `json:"certificate_url" gorm:"type:varchar(128);not null"` State int `json:"state" gorm:"type:int; not null"` CreatorId string `json:"creator_id" gorm:"type:varchar(128);not null"` CreatorName string `json:"creator_name" gorm:"type:varchar(128);not null"` CreatedAt Time `json:"created_at" gorm:"column:create_time;type:datetime default CURRENT_TIMESTAMP"` UpdatedAt Time `json:"updated_at" gorm:"column:update_time;type:datetime default CURRENT_TIMESTAMP"` } type Company2Users struct { ID int `json:"id" gorm:"type:bigint(20);not null"` CompanyId int `json:"company_id" gorm:"type:bigint(20);not null"` UserId string `json:"user_id" gorm:"type:varchar(128);not null"` State int `json:"state" gorm:"type:int; not null"` CreatedAt Time `json:"created_at" gorm:"column:create_time;type:datetime default CURRENT_TIMESTAMP"` UpdatedAt Time `json:"updated_at" gorm:"column:update_time;type:datetime default CURRENT_TIMESTAMP"` } func (Company2Users) TableName() string { return "company_users" } func (CompanyCreateRequest) TableName() string { return "company_create_request" } func (Company) TableName() string { return "company" }