mysql

package
v0.0.0-...-0e73c6a Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(cfg DBConfig) *xorm.Engine

Types

type DBConfig

type DBConfig struct {
	DriverName string `toml:"driver_name"`
	Dsn        string `toml:"dsn"`
}

type Delivery

type Delivery struct {
	Id          int64     `xorm:"not null pk autoincr"`
	TemplateId  int64     `xorm:"INT"`
	Status      int       `xorm:"INT"`
	SendChannel int       `xorm:"comment('消息发送渠道 10.IM 20.Push 30.短信 40.Email 50.公众号') VARCHAR(255)"`
	MsgType     int       `xorm:"comment('10.通知类消息 20.营销类消息 30.验证码类消息') INT"`
	Proposer    string    `xorm:"comment('业务方') VARCHAR(255)"`
	Creator     string    `xorm:"VARCHAR(255)"`
	Updator     string    `xorm:"VARCHAR(255)"`
	IsDelted    int       `xorm:"INT"`
	Created     time.Time `xorm:"TIMESTAMP"`
	Updated     time.Time `xorm:"TIMESTAMP"`
}

func (Delivery) TableName

func (Delivery) TableName() string

type INotifyGoDAO

type INotifyGoDAO interface {
	InsertRecord(ctx context.Context, templateId int64, target notifier.Receiver, msgContent string) error
}

func NewINotifyGoDAO

func NewINotifyGoDAO(e *xorm.Engine) INotifyGoDAO

type ITemplateDAO

type ITemplateDAO interface {
	GetTContent(templateId uint64, country string) (string, error)
}

func NewITemplateDAO

func NewITemplateDAO(e *xorm.Engine) ITemplateDAO

type Target

type Target struct {
	Id           int64  `xorm:"not null pk INT"`
	TargetIdType string `xorm:"comment('接收目标id类型') VARCHAR(8)"`
	TargetId     string `xorm:"comment('接收目标id') VARCHAR(255)"`
	DeliveryId   int64  `xorm:"INT"`
	Status       int    `xorm:"INT"`
	MsgContent   string `xorm:"TEXT"`
}

func (Target) TableName

func (Target) TableName() string

type Template

type Template struct {
	Id         int64     `xorm:"not null pk INT"`
	Country    string    `xorm:"VARCHAR(255)"`
	Type       int       `xorm:"comment('sms|email|push') INT"`
	EnContent  string    `xorm:"TEXT"`
	ChsContent string    `xorm:"TEXT"`
	ChtContent string    `xorm:"TEXT"`
	Creator    string    `xorm:"VARCHAR(255)"`
	Updator    string    `xorm:"VARCHAR(255)"`
	IsDelted   int       `xorm:"INT"`
	Created    time.Time `xorm:"TIMESTAMP"`
	Updated    time.Time `xorm:"TIMESTAMP"`
}

func (Template) TableName

func (Template) TableName() string

Jump to

Keyboard shortcuts

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