model

package
v0.0.0-...-db6f998 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountService *accountServiceProvide
View Source
var AdminService *adminServiceProvide
View Source
var BillService *billServiceProvide
View Source
var GymService *gymServiceProvide

Functions

This section is empty.

Types

type Account

type Account struct {
	Phone    string    `bson:"_id"`
	Name     string    `bson:"Name"`
	Balance  int       `bson:"Balance"`  // 余额
	Recorded int       `bson:"Recorded"` // 充值总金额
	Active   bool      `bson:"Active"`   // 用户是否在场
	State    bool      `bson:"State"`    // 身份:0.不可用 1.正常使用
	Created  time.Time `bson:"Created"`
}

Account represents the account information.

type Admin

type Admin struct {
	Id      bson.ObjectId `bson:"_id"`
	Name    string        `bson:"Name"`
	Pwd     string        `bson:"Pwd"`
	Created time.Time     `bson:"Created"`
}

type Bill

type Bill struct {
	Id       bson.ObjectId `bson:"_id"`
	Phone    string        `bson:"Phone"`    // 用户 id
	Gid      int           `bson:"Gid"`      // 场地 id
	State    bool          `bson:"State"`    // true:完成 false:未完成
	InAt     time.Time     `bson:"InAt"`     // 入场时间
	OutAt    time.Time     `bson:"OutAt"`    // 出场时间
	Duration int           `bson:"Duration"` // 使用时长: min
	Price    int           `bson:"Price"`    // 单价: ¥/h
	Consume  int           `bson:"Consume"`  // 消费: ¥
}

type Gym

type Gym struct {
	Id    int    `bson:"_id"`
	Name  string `bson:"Name"`
	IsUse bool   `bson:"IsUse"` // 是否正在使用
	State bool   `bson:"State"` // 状态:0.不可用
}

Jump to

Keyboard shortcuts

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