flymodel

package
v0.0.0-...-593c55d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBName = "database"
)

Variables

View Source
var (
	Engine *xorm.Engine
)

Functions

This section is empty.

Types

type Base

type Base struct {
	ID      int64      `json:"id" xorm:"not null pk autoincr"`
	Created *time.Time `json:"created" xorm:"created not null index"`
	Updated *time.Time `json:"updated" xorm:"updated not null index"`
	Version int        `json:"version" xorm:"version not null index"`
}

type FlyData

type FlyData struct {
	Base `xorm:"extends"`

	RemoteID int64 `json:"remote_id" xorm:"not null unique"`

	Gid      int64  `json:"gid" xorm:"notnull index"`
	RoomID   int64  `json:"room_id" xorm:"notnull"`
	Issue    string `json:"issue" xorm:"notnull TEXT index"`
	BetMoney int64  `json:"bet_money" xorm:"notnull"`
	PlayName string `json:"play_name" xorm:"notnull TEXT"`
	Content  string `json:"content" xorm:"notnull TEXT"`
	//-1=>待飞单,1=>成功,2=>失败
	StatusCode int `json:"status_code" xorm:"notnull index"`
}

func (*FlyData) FindById

func (m *FlyData) FindById(id int64) (bean *FlyData, err error)

func (*FlyData) InsertOne

func (m *FlyData) InsertOne() error

type FlyRecord

type FlyRecord struct {
	Base `xorm:"extends"`

	RemoteID int64 `json:"remote_id" xorm:"not null index"`

	Gid      int64  `json:"gid" xorm:"notnull index"`
	RoomID   int64  `json:"room_id" xorm:"notnull"`
	Issue    string `json:"issue" xorm:"notnull TEXT index"`
	BetMoney int64  `json:"bet_money" xorm:"notnull"`
	PlayName string `json:"play_name" xorm:"notnull TEXT"`
	Content  string `json:"content" xorm:"notnull TEXT"`
	//-1=>待飞单,1=>成功,2=>失败
	StatusCode int `json:"status_code" xorm:"notnull index"`

	Reason string `json:"reason" xorm:"not null default('''') TEXT"`
}

func (*FlyRecord) InsertOne

func (m *FlyRecord) InsertOne() error

Jump to

Keyboard shortcuts

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