package models

import (
	"github.com/beego/beego/v2/client/orm"
	"time"
)

type CygxCompanyUserType struct {
	Id             int `orm:"column(id);pk" description:"分析师id"`
	CompanyId      int
	CustomerTypeId int       `description:"用户身份ID"`
	PackageType    int       `description:"1：70万 2：45w"`
	CreateTime     time.Time `description:"创建时间"`
	ModifyTime     time.Time `description:"创建时间"`
}

// 通过活动ID获取详情
func GetCygxCompanyUserType(companyId int) (item *CygxCompanyUserType, err error) {
	o := orm.NewOrm()
	sql := `SELECT *  FROM cygx_company_user_type AS a WHERE a.company_id=?  `
	err = o.Raw(sql, companyId).QueryRow(&item)
	return
}
