package models import ( "github.com/beego/beego/v2/client/orm" "time" ) type CygxYanxuanSpecialFollow struct { CygxYanxuanSpecialFollowId int `orm:"column(cygx_yanxuan_special_follow_id);pk"` UserId int // 用户ID FollowUserId int // 被关注用户ID Mobile string // 手机号 Email string // 邮箱 CompanyId int // 公司ID CompanyName string // 公司名称 RealName string // 用户实际名称 SellerName string // 所属销售 CreateTime time.Time // 创建时间 ModifyTime time.Time // 修改时间 RegisterPlatform int // 来源 1小程序,2:网页 YanxuanSpecialId int // cygx_yanxuan_special 表主键ID } type FollowCygxYanxuanSpecialReq struct { FollowUserId int // 被关注的用户id Status int // 1关注2取消关注 SpecialId int // 研选专栏Id } func AddCygxYanxuanSpecialFollow(item *CygxYanxuanSpecialFollow) (err error) { o := orm.NewOrm() _, err = o.Insert(item) return } func DelCygxYanxuanSpecialFollow(userId, followUserId int) (err error) { o := orm.NewOrm() sql := `DELETE FROM cygx_yanxuan_special_follow WHERE user_id=? AND follow_user_id=? ` _, err = o.Raw(sql, userId, followUserId).Exec() return }