1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type CygxBannerYxSurvey struct {
- SuveryId int `orm:"column(suvery_id);pk"`
- UserId int
- CreateTime time.Time
- Mobile string `description:"手机号"`
- Email string `description:"邮箱"`
- CompanyId int `description:"公司id"`
- CompanyName string `description:"公司名称"`
- ModifyTime time.Time `description:"修改时间"`
- RealName string `description:"用户实际名称"`
- SellerName string `description:"所属销售"`
- Content string `description:"内容"`
- RegisterPlatform int `description:"来源 1小程序,2:网页"`
- }
- type CygxBannerYxSurveyReq struct {
- Content string `description:"内容"`
- }
- type CygxBannerYxSurveyResp struct {
- SuveryId int `gorm:"column:suvery_id;primary_key;AUTO_INCREMENT" json:""`
- UserId int `gorm:"column:user_id" json:""`
- Mobile string `gorm:"column:mobile" json:""`
- Email string `gorm:"column:email" json:""`
- CompanyId int `gorm:"column:company_id;default:0" json:""`
- CompanyName string `gorm:"column:company_name" json:""`
- RealName string `gorm:"column:real_name" json:""`
- SellerName string `gorm:"column:seller_name" json:""`
- CreateTime string `gorm:"column:create_time" json:""`
- ModifyTime string `gorm:"column:modify_time" json:""`
- RegisterPlatform int `gorm:"column:register_platform;default:1;NOT NULL" json:""`
- Content string `gorm:"column:content;NOT NULL" json:""`
- }
- func AddCygxBannerYxSurvey(item *CygxBannerYxSurvey) (lastId int64, err error) {
- o := orm.NewOrm()
- lastId, err = o.Insert(item)
- return
- }
- func GetCygxBannerYxSurveyDetail(suveryId int) (item *CygxBannerYxSurveyResp, err error) {
- o := orm.NewOrm()
- sql := `SELECT * FROM cygx_banner_yx_survey WHERE suvery_id=? `
- err = o.Raw(sql, suveryId).QueryRow(&item)
- return
- }
- type CygxBannerYxSurveyRespDetailResp struct {
- Detail *CygxBannerYxSurveyResp
- }
|