models

package
v0.0.0-...-c371f03 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Aid     int `orm:"pk"`
	Uid     int
	Balance float64
}

type Cart

type Cart struct {
	Caid       int `orm:"pk"`
	Uid        int
	Gid        int
	CreateTime int64
}

func FindCartByUser

func FindCartByUser(uid int) []Cart

type Category

type Category struct {
	Cid        int `orm:"pk"`
	ClassName  string
	CreateTime int
}

func FindCategoryList

func FindCategoryList() []Category

type City

type City struct {
	AreaId   int `orm:"pk"`
	AreaName string
	LevelNum int
	ParentId int
}

func GetAreaList

func GetAreaList(cityId int) []City

func GetCityList

func GetCityList(ProvinceId int) []City

func GetName

func GetName(code int) City

func GetProvinceList

func GetProvinceList() []City

type Good

type Good struct {
	Gid      int `orm:"pk"`
	Cid      int
	Uid      int
	ComName  string
	Price    float64
	Discount float64

	ComStatus  int
	PayStatus  int
	UpdateTime int64
	CreateTime int64
	// contains filtered or unexported fields
}

func FindGoodById

func FindGoodById(id int) Good

func FindGoodList

func FindGoodList(query GoodQuery) []Good

type GoodQuery

type GoodQuery struct {
	MaxPrice   float64
	MinPrice   float64
	BeforeTime int64
	AfterTime  int64
}

type Log

type Log struct {
	LogId      int `orm:"pk"`
	Uid        int
	ActionType int
	ActionFrom int
	CreateTime int
	Remark     string
}

func (Log) CreateLog

func (l Log) CreateLog() int64

type LoginForm

type LoginForm struct {
	UserName string `form:"username"`
	Password string `form:"password"`
}

type Page

type Page struct {
	Page      int
	Count     int
	PageSize  int
	PageCount int
	Offset    int
}

type RegisterForm

type RegisterForm struct {
	UserName string `form:"username"`
	Password string `form:"password"`
	Code     int    `form:"code"`
}

type User

type User struct {
	Uid        int `orm:"pk"`
	Username   string
	Password   string
	RandomSalt string
	Nickname   string
	CreateTime int64
	Sex        int8
	Ip         string
	LoginTime  int64
	Sign       string
}

func FindUser

func FindUser(username string) User

func FindUserById

func FindUserById(uid int) User

func (*User) AddUser

func (u *User) AddUser() int64

Jump to

Keyboard shortcuts

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