Documentation ¶
Index ¶
- func DB() *gorm.DB
- type Activity
- type Catalog
- type Fail
- type Fans
- func (fans *Fans) GetFansAllFollows(offser, limit int) (follows []Follow)
- func (fans *Fans) GetFansAllSources(offser, limit int) (sources []Source)
- func (fans *Fans) GetFansByID(id uint)
- func (fans *Fans) GetFansByOpenID(openID string)
- func (fans *Fans) GetLastUser()
- func (fans *Fans) RelationLog(relationID int)
- func (fans *Fans) Save()
- type Feedback
- type Follow
- type Log
- type Post
- type Qrcode
- type Relation
- type Share
- type Sign
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Activity ¶
type Activity struct { ID uint `gorm:"primary_key"` Title string `gorm:"type:varchar(255)"` // 资源名称 名称搜索 WxTo string `gorm:"type:varchar(255)"` // 目标地址 小程序往哪里走 Resource string `gorm:"type:varchar(255);index"` // 目标地址 Total int64 // 次数统计 Level int32 CreatedAt time.Time UpdatedAt time.Time }
Activity 号召阅读
func (*Activity) GetActivities ¶
GetActivities 获取最近100条号召令
func (*Activity) GetActivityByID ¶
GetActivityByID 获取一个资源
func (*Activity) GetActivityByResource ¶
GetActivityByResource 资源地址
func (*Activity) GetActivityByWxto ¶
GetActivityByWxto 想去哪里 创建一个记录
type Catalog ¶
type Catalog struct { ID uint `gorm:"primary_key"` OpenID string `gorm:"type:varchar(255);index"` // 微信文章地址 Title string `gorm:"type:varchar(255);"` //订阅formID,一次订阅只能推送一次通知 URL string `gorm:"type:varchar(2048);"` //订阅formID,一次订阅只能推送一次通知 CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
Catalog 目录
type Fail ¶
type Fail struct { ID uint `gorm:"primary_key"` FansID uint `gorm:"index:user_id"` // 谁在收集助力 CreatedAt time.Time }
Fail 签到记录
type Fans ¶
type Fans struct { ID uint `gorm:"primary_key"` OpenID string `gorm:"type:varchar(255);unique_index"` NickName string Gender int Provider string //平台 City string Province string Country string AvatarURL string Language string Timestamp int64 Level int32 // 用户等级 Score int64 // 积分 Total int64 // 总分 LoginTotal int64 // 授权访问次数 InvitationTotal int64 // 邀请用户次数 AppID string SessionKey string // 粉丝上次的session key 如果有变化,同步一次粉丝数据 CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
Fans 粉丝数据信息
func (*Fans) GetFansAllFollows ¶
GetFansAllFollows 获取用户关注的源
func (*Fans) GetFansAllSources ¶
GetFansAllSources 获取粉丝添加的源
func (*Fans) GetFansByOpenID ¶
GetFansByOpenID 通过openID获取粉丝信息如果没有的话进行初始化
func (*Fans) RelationLog ¶
RelationLog 记录 openID 吸引粉丝访问
type Feedback ¶
type Feedback struct { ID uint `gorm:"primary_key"` OpenID string `gorm:"type:varchar(255);index"` // 微信文章地址 FormID string `gorm:"type:varchar(255);"` //订阅formID,一次订阅只能推送一次通知 Problem string `gorm:"type:text;"` // 问题 Answer string `gorm:"type:text;"` // 答复 Show bool //是否显示 CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
Feedback 粉丝
type Follow ¶
type Follow struct { ID uint `gorm:"primary_key"` OpenID string `gorm:"type:varchar(255);index"` Title string URL string Drive string Page string CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
Follow 关注列表
type Log ¶
type Log struct { ID uint `gorm:"primary_key"` OpenID string `gorm:"type:varchar(255);index"` Title string URL string Drive string Page string CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
Log 粉丝浏览记录
type Post ¶
type Post struct { ID uint `gorm:"primary_key"` Cate int32 // 类型 1文章 2小说 Name string `gorm:"type:varchar(255);index"` // 资源名称 名称搜索 WxTo string `gorm:"type:varchar(255);index"` // 目标地址 小程序往哪里走 From string // 数据来源 Total int64 // 次数统计 Level int32 // 级别限制(不加入搜索条件限制) CreatedAt time.Time UpdatedAt time.Time }
Post 小程序二维码
func (*Post) GetPostsByName ¶
GetPostsByName 通过名字获得查询记录
func (*Post) GetPostsByNameLimitLevel ¶
GetPostsByNameLimitLevel 通过名字获得查询记录 限制资源等级
type Qrcode ¶
type Qrcode struct { ID uint `gorm:"primary_key"` WxTo string `gorm:"type:varchar(255);index"` // 目标地址 Total int64 //次数统计 CreatedAt time.Time UpdatedAt time.Time }
Qrcode 小程序二维码
type Relation ¶
type Relation struct { ID uint `gorm:"primary_key"` FansID uint `gorm:"index:id"` //粉丝ID RelationID uint `gorm:"index:id"` //被吸来ID CreatedAt time.Time }
Relation 关联关系(粉丝分享小程序吸引别人来)
Click to show internal directories.
Click to hide internal directories.