You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
849 B
28 lines
849 B
4 years ago
|
package enterprise
|
||
|
|
||
|
import "recook/internal/dbc"
|
||
|
|
||
|
const ()
|
||
|
|
||
|
type GysEnterpriseSectorModel struct {
|
||
|
Id uint `gorm:"column:id;primary_key" json:"id"`
|
||
|
Name string `json:"name"`
|
||
|
Phone string `json:"phone"`
|
||
|
Email string `json:"email"`
|
||
|
Info string `json:"info"`
|
||
|
CodeUrl string `json:"code_url"`
|
||
|
ProveUrl string `json:"prove_url"`
|
||
|
Position string `json:"position"`
|
||
|
EnterpriseID uint `json:"enterprise_id"`
|
||
|
Type int `json:"type"`
|
||
|
}
|
||
|
|
||
|
func (r *GysEnterpriseSectorModel) TableName() string {
|
||
|
return "gys_enterprise_sector"
|
||
|
}
|
||
|
|
||
|
// @Style 获取单条数据
|
||
|
func (r *GysEnterpriseSectorModel) FindByEnterpriseIDAndType(enterpriseID uint, sectorType int) (result GysEnterpriseSectorModel) {
|
||
|
dbc.DB.First(&result, "enterprise_id = ? and `type` = ?", enterpriseID, sectorType)
|
||
|
return
|
||
|
}
|