...
|
...
|
@@ -7,13 +7,13 @@ import ( |
|
|
)
|
|
|
|
|
|
type ChanceType struct {
|
|
|
Id int `orm:"column(id);auto"`
|
|
|
Name string `orm:"column(name);size(50)" description:"机会类型名称"`
|
|
|
Icon string `orm:"column(icon);size(500);null" description:"图标地址"`
|
|
|
CompanyId int `orm:"column(company_id)" description:"表company.id 公司编号"`
|
|
|
SortNum int `orm:"column(sort_num);null" description:"序号 公司下的序号"`
|
|
|
CreateAt time.Time `orm:"column(create_at);type(timestamp);null" description:"创建时间 "`
|
|
|
UpdateAt time.Time `orm:"column(update_at);type(timestamp);null" description:"更新时间 "`
|
|
|
Id int `orm:"column(id);auto" json:"id"`
|
|
|
Name string `orm:"column(name);size(50)" description:"机会类型名称" json:"name"`
|
|
|
Icon string `orm:"column(icon);size(500);null" description:"图标地址" json:"icon"`
|
|
|
CompanyId int `orm:"column(company_id)" description:"表company.id 公司编号" json:"-"`
|
|
|
SortNum int `orm:"column(sort_num);null" description:"序号 公司下的序号" json:"-"`
|
|
|
CreateAt time.Time `orm:"column(create_at);type(timestamp);null" description:"创建时间 " json:"-"`
|
|
|
UpdateAt time.Time `orm:"column(update_at);type(timestamp);null" description:"更新时间 " json:"-"`
|
|
|
}
|
|
|
|
|
|
func (t *ChanceType) TableName() string {
|
...
|
...
|
@@ -77,7 +77,7 @@ func DeleteChanceType(id int) (err error) { |
|
|
func GetChanceTypeAll(companyId int64) (v []*ChanceType, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := "select * from chance_type where company_id=? order by sort_num"
|
|
|
if _, err = o.Raw(sql).QueryRows(&v, companyId); err == nil {
|
|
|
if _, err = o.Raw(sql, companyId).QueryRows(&v); err == nil {
|
|
|
return
|
|
|
}
|
|
|
return
|
...
|
...
|
|