model

package
v0.0.0-...-94578c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCodeTemplateByTemplateId

func DeleteCodeTemplateByTemplateId(tempId int) (int64, error)

func GetWechatTppAuthAppidList

func GetWechatTppAuthAppidList() (appids []string)

func InsertCodeTemplate

func InsertCodeTemplate(codeTemp *CodeTemplate) (int64, error)

func SaveWechatTppAuthAppid

func SaveWechatTppAuthAppid(appid string)

func SetWechatTppAuthAppidExpired

func SetWechatTppAuthAppidExpired(appid string, d time.Duration)

func SyncWechatTppOpenAccount

func SyncWechatTppOpenAccount(appid, openAppid string) error

Types

type CodeTemplate

type CodeTemplate struct {
	hskmodel.Model     `xorm:"extends" json:"-"`
	DraftId            int   `json:"draft_id" xorm:"not null default 0 comment('草稿箱id') INT(11)"`
	Timestamp          int64 `json:"timestamp" xorm:"not null default 0 comment('时间戳') INT(11)"`
	*template.Template `xorm:"extends"`
}

func GetCTByDraftId

func GetCTByDraftId(draftId, timestamp interface{}) (*CodeTemplate, bool, error)

func GetCTByTemplateId

func GetCTByTemplateId(tempId interface{}) (*CodeTemplate, bool, error)

func ListCodeTemplate

func ListCodeTemplate() (cts []*CodeTemplate, err error)

type WechatTppAuthAppid

type WechatTppAuthAppid struct {
	hskmodel.Model `xorm:"extends" json:"-"`
	Appid          string                 `json:"appid" xorm:"not null defualt '' unique comment('appid') VARCHAR(128)"`
	Expired        time.Time              `json:"expired" xorm:"comment('过期时间') DATETIME"`
	Extension      map[string]interface{} `json:"extension" xorm:"json"`
}

func GetRandWechatTppAuthAppidExpired

func GetRandWechatTppAuthAppidExpired() *WechatTppAuthAppid

type WechatTppOpenAccount

type WechatTppOpenAccount struct {
	hskmodel.Model `xorm:"extends" json:"-"`
	OpenAppid      string                 `json:"open_appid" xorm:"not null defualt '' comment('open_appid') VARCHAR(128)"`
	Appid          string                 `json:"appid" xorm:"not null defualt '' comment('appid') VARCHAR(128)"`
	Extension      map[string]interface{} `json:"extension" xorm:"json"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL