models

package
v0.0.0-...-64d7a94 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Userid = 11111111
)

Variables

This section is empty.

Functions

func DataTableInit

func DataTableInit(db *gorm.DB)

func GetGorm

func GetGorm() *gorm.DB

func Init

func Init()

Types

type Dialog

type Dialog struct {
	//ID        int    `json:"dialog_id"`
	SessionId string `gorm:"size:256" json:"session_id"`
	UserID    int    `json:"user_id"`
	Path      string `json:"path"`
}

type User

type User struct {
	ID           int
	Name         string `gorm:"size:50"  json:"name"`
	PasswordHash string `gorm:"size:256" json:"password"`
	Email        string `gorm:"size:50;unique"  json:"email"`
	RealName     string `gorm:"size:32" json:"real_name"`
	IdCard       string `gorm:"size:20" json:"id_card"`
	AvatarUrl    string `gorm:"size:256" json:"avatar_url"`
	Dialogs      []Dialog
}

Jump to

Keyboard shortcuts

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