model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CaptchaStatusPending = -1
	CaptchaStatusSuccess = 1
	CaptchaStatusTimeout = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Advertise struct {
	ID             int64  `gorm:"primaryKey,column:id" json:"id"`
	Title          string `gorm:"column:title" json:"title"`
	Url            string `gorm:"column:url" json:"url"`
	Sort           int    `gorm:"column:sort" json:"sort"`
	ValidityPeriod int64  `gorm:"column:validity_period" json:"validity_period"`
	CreatedAt      int64  `gorm:"column:created_at" json:"created_at"`
}

func (Advertise) TableName

func (Advertise) TableName() string

type BaseModel added in v0.0.2

type BaseModel struct {
	ID        int64           `gorm:"column:id;primary_key" json:"id"`
	CreatedAt carbon.DateTime `gorm:"column:created_at" json:"created_at"`
	UpdatedAt carbon.DateTime `gorm:"column:updated_at" json:"updated_at"`
	DeletedAt gorm.DeletedAt  `gorm:"column:deleted_at" json:"deleted_at"`
}

type UserCaptchaRecord added in v0.0.2

type UserCaptchaRecord struct {
	BaseModel
	CaptchaId             string `gorm:"column:captcha_id;unique_index:captcha_id_index" json:"captcha_id"` //验证id
	TelegramChatName      string `gorm:"column:telegram_chat_name" json:"telegram_chat_name"`
	TelegramUserLastName  string `gorm:"column:telegram_user_last_name" json:"telegram_user_last_name"`
	TelegramUserFirstName string `gorm:"column:telegram_user_first_name" json:"telegram_user_first_name"`
	TelegramUserId        int64  `gorm:"column:telegram_user_id" json:"telegram_user_id"`
	TelegramChatId        int64  `gorm:"column:telegram_chat_id" json:"telegram_chat_id"`

	CaptchaMessageId      int             `gorm:"column:captcha_message_id" json:"captcha_message_id"`             // 群-待验证消息id
	CaptchaStatus         int             `gorm:"column:captcha_status" json:"captcha_status"`                     // 验证状态 -1待验证 1已验证 2已超时
	CaptchaTimeoutTime    carbon.DateTime `gorm:"column:captcha_timeout_time"  json:"captcha_timeout_time"`        // 验证超时时间
	CaptchaTimeoutEndTime carbon.DateTime `gorm:"column:captcha_timeout_end_time" json:"captcha_timeout_end_time"` // 验证超时截止时间
	CaptchaSuccessTime    carbon.DateTime `gorm:"column:captcha_success_time" json:"captcha_success_time"`         // 验证成功时间

	CaptchaCodeMessageId int    `gorm:"column:captcha_code_message_id"  json:"captcha_code_message_id"` // 验证码消息id
	CaptchaCode          string `gorm:"column:captcha_code" json:"captcha_code"`                        // 验证码内容

}

func (UserCaptchaRecord) TableName added in v0.0.2

func (UserCaptchaRecord) TableName() string

Jump to

Keyboard shortcuts

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