models

package
v0.0.0-...-78f8b4d Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CustomerUser = int(iota)
	MerchantUser
	AdminUser
	SuperUser
)

Variables

View Source
var UserType map[int]string = map[int]string{
	SuperUser:    "超级用户",
	AdminUser:    "管理员",
	MerchantUser: "商家",
	CustomerUser: "顾客",
}

Functions

func IcDb

func IcDb() *gorm.DB

Types

type IcUser

type IcUser struct {
	gorm.Model
	Phone     string `gorm:"not null;unique"`
	Name      string
	Role      int `gorm:"default:0"`
	Banned    int `gorm:"default:0"`
	Points    int `gorm:"default:0"`
	AvatarUrl string
}

type VerificationCode

type VerificationCode struct {
	gorm.Model
	Phone string
	Code  uint
}

Jump to

Keyboard shortcuts

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