model

package
v0.0.0-...-e14c0b9 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultJsonField = "{}"

	DefaultDelCondition = "deleted_at = 0"
	WhereIdCondition    = "id = ?"

	OrderUpdatedAtDesc = "updated_at desc"
	OrderCreatedAtDesc = "created_at desc"
	OrderCreatedAtAsc  = "created_at asc"
	OrderIDAsc         = "id asc"
	OrderIDDesc        = "id desc"

	ColumnUpdatedAt = "updated_at"
	ColumnCreatedAt = "created_at"
	ColumnDeletedAt = "deleted_at"
)
View Source
const (
	NotifyFail    = "FAIL"
	NotifySuccess = "SUCCESS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionReq

type ActionReq struct {
	TaskId     string `json:"taskId"`
	CustomId   string `json:"customId"`
	NotifyHook string `json:"notifyHook"`
	State      string `json:"state"`
}

type AdminListReq

type AdminListReq struct {
	Range  string `form:"range"`
	Filter string `form:"filter"`
	Sort   string `form:"sort"`
	// parse from Range
	Limit  int
	Offset int
	// parse from Sort
	SortStr string
}

type BaseListResp

type BaseListResp struct {
	Total int64         `json:"total"`
	List  []interface{} `json:"list"`
}

type BaseModel

type BaseModel struct {
	ID        int64     `gorm:"primarykey" json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt int64     `json:"deleted_at"`
}

type BaseWechatResp

type BaseWechatResp struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type Button

type Button struct {
	CustomId string `json:"customId"`
	Emoji    string `json:"emoji"`
	Label    string `json:"label"`
	Style    int    `json:"style"`
	Type     int    `json:"type"`
}

type DiscordPP

type DiscordPP struct {
	DiscordChannelId  string `json:"discordChannelId"`
	DiscordInstanceId string `json:"discordInstanceId"`
}

type FetchTasksReq

type FetchTasksReq struct {
	Ids []string `json:"ids"`
}

type FetchTasksResp

type FetchTasksResp struct {
	Id          string    `json:"id"`
	Description string    `json:"description"`
	FailReason  string    `json:"failReason"`
	ImageUrl    string    `json:"imageUrl"`
	Progress    string    `json:"progress"`
	Status      string    `json:"status"`
	Action      string    `json:"action"`
	Buttons     []*Button `json:"buttons"`
}

type GetAccessTokenResp

type GetAccessTokenResp struct {
	BaseWechatResp
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
}

type IdReq

type IdReq struct {
	Id int64 `json:"id" form:"id"`
}

type ImagineReq

type ImagineReq struct {
	Base64Array []string `json:"base64Array"`
	Modes       []string `json:"modes"`
	Prompt      string   `json:"prompt"`
	Remix       bool     `json:"remix"`
}

type IntArray

type IntArray []int64

func (*IntArray) Scan

func (of *IntArray) Scan(val interface{}) error

func (*IntArray) Value

func (of *IntArray) Value() (driver.Value, error)

type MjBaseResponse

type MjBaseResponse struct {
	Code        int       `json:"code"`
	Description string    `json:"description"`
	Properties  DiscordPP `json:"properties"`
	Result      string    `json:"result"`
}

type NotifyResp

type NotifyResp struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type PrepaySign

type PrepaySign struct {
	TimeStamp string `json:"time_stamp"`
	NonceStr  string `json:"nonce_str"`
	Package   string `json:"package"`
	SignType  string `json:"sign_type"`
	PaySign   string `json:"pay_sign"`
}

type StartAndLimit

type StartAndLimit struct {
	Start int `form:"start" json:"start"`
	Limit int `form:"limit" json:"limit"`
}

type StringArray

type StringArray []string

func (*StringArray) Scan

func (urls *StringArray) Scan(val interface{}) error

func (StringArray) Value

func (urls StringArray) Value() (driver.Value, error)

type WXSessionRet

type WXSessionRet struct {
	OpenId     string `json:"openid"`
	SessionKey string `json:"session_key"`
	UnionId    string `json:"unionid"`
	BaseWechatResp
}

type WeChatGetUserPhoneResp

type WeChatGetUserPhoneResp struct {
	BaseWechatResp
	PhoneInfo *WeChatGetUserPhoneRespPhone `json:"phone_info"`
}

type WeChatGetUserPhoneRespPhone

type WeChatGetUserPhoneRespPhone struct {
	PurePhoneNumber string `json:"purePhoneNumber"`
	CountryCode     string `json:"countryCode"`
}

type WeChatLoginReq

type WeChatLoginReq struct {
	Code string `json:"code" validate:"min=1"`
}

type WeChatLoginResp

type WeChatLoginResp struct {
	Token string `json:"token"`
}

type WeChatPhoneLoginReq

type WeChatPhoneLoginReq struct {
	PhoneCode   string `json:"phone_code" validate:"min=1"`
	SessionCode string `json:"session_code" validate:"min=1"`
}

type WeComRobotContent

type WeComRobotContent struct {
	Title     string `json:"title,omitempty"`
	Uid       string `json:"uid"`
	RequestId string `json:"request_id,omitempty"`
	Message   string `json:"message,omitempty"`
}

type WeComRobotReq

type WeComRobotReq struct {
	MsgType string             `json:"msgtype"`
	Text    *WeComRobotReqText `json:"text"`
}

type WeComRobotReqText

type WeComRobotReqText struct {
	Content             string   `json:"content"`
	MentionedMobileList []string `json:"mentioned_mobile_list"`
}

Jump to

Keyboard shortcuts

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