models

package
v0.0.0-...-d36ff20 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLog

func CreateLog(db *gorm.DB, user uint64, lang string, ip string, level pb.UserLogsResponse_Item_Level, plugin any, resource_type any, resource_id *uint64, message string, args interface{}) error

func Languages

func Languages(db *gorm.DB) ([]string, error)

func SetLocale

func SetLocale(db *gorm.DB, lang string, code string, message string) error

func T

func T(db *gorm.DB, lang string, code string, args interface{}) string

Types

type EmailUser

type EmailUser struct {
	ID          uint64
	UserID      uint64
	RealName    string
	Nickname    string
	Email       string
	Password    []byte
	Salt        []byte
	Avatar      string
	ConfirmedAt *time.Time
	DeletedAt   *time.Time
	Version     uint32
	UpdatedAt   time.Time
	CreatedAt   time.Time
}

type GoogleOauth2User

type GoogleOauth2User struct {
	ID            uint64
	UserID        uint64
	Subject       string
	Email         *string
	EmailVerified bool
	Name          *string
	Picture       *string
	Locale        *string
	Token         []byte
	DeletedAt     *time.Time
	Version       uint32
	UpdatedAt     time.Time
	CreatedAt     time.Time
}

type LeaveWord

type LeaveWord struct {
	ID          uint64
	Lang        string
	IP          string
	Body        string
	Editor      string
	Status      string
	PublishedAt *time.Time
	DeletedAt   *time.Time
	Version     uint32
	UpdatedAt   time.Time
	CreatedAt   time.Time
}

type Locale

type Locale struct {
	ID        uint64
	Lang      string
	Code      string
	Message   string
	Version   uint32
	UpdatedAt time.Time
	CreatedAt time.Time
}

type Log

type Log struct {
	ID           uint64
	UserID       uint64
	Plugin       string
	IP           string
	Level        string
	ResourceType string
	ResourceID   *uint64
	Message      string
	CreatedAt    time.Time
}

type Session

type Session struct {
	ID           uint64
	UserID       uint64
	UID          string
	ProviderType string
	ProviderID   uint64
	IP           string
	ExpiresAt    time.Time
	DeletedAt    *time.Time
	CreatedAt    time.Time
}

type Setting

type Setting struct {
	ID        uint64
	UserID    *uint
	Key       string
	Value     []byte
	Salt      *[]byte
	Version   uint32
	UpdatedAt time.Time
	CreatedAt time.Time
}

type User

type User struct {
	ID              uint64
	UID             string
	Lang            string
	Timezone        string
	SignInCount     uint32
	CurrentSignInAt *time.Time
	CurrentSignInIP *string
	LastSignInAt    *time.Time
	LastSignInIP    *string
	LockedAt        *time.Time
	DeletedAt       *time.Time
	Version         uint32
	UpdatedAt       time.Time
	CreatedAt       time.Time
}

type WechatMiniProgramUser

type WechatMiniProgramUser struct {
	ID        uint64
	UserID    uint64
	UnionID   string
	AppID     string
	OpenID    string
	Nickname  *string
	AvatarURL *string
	DeletedAt *time.Time
	Version   uint32
	UpdatedAt time.Time
	CreatedAt time.Time
}

type WechatOauth2User

type WechatOauth2User struct {
	ID         uint64
	UserID     uint64
	UnionID    string
	AppID      string
	OpenID     string
	Nickname   string
	Sex        uint8
	City       string
	Province   string
	Country    string
	HeadImgURL *string
	Privilege  []byte
	Lang       string
	DeletedAt  *time.Time
	Version    uint32
	UpdatedAt  time.Time
	CreatedAt  time.Time
}

Jump to

Keyboard shortcuts

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