models

package
v0.0.0-...-bd548de Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddMaterial_Inventory

func AddMaterial_Inventory(material_inv Material_Inventory) (int64, error)

func AddUser

func AddUser(user User) (int64, error)

func InitDb

func InitDb()

Types

type Inventory

type Inventory struct {
	Id               int64     `json:"-"`
	Inventory_code   string    `json:"inventory_code" xorm:"nvarchar(255)"`
	Inventory_name   string    `json:"inventory_name" xorm:"nvarchar(255)"`
	Remark           string    `json:"remark"`
	Create_time      time.Time `json:"create_time"`
	Create_user_id   string    `json:"create_user_id"  xorm:"nvarchar(255)"`
	Create_user_name string    `json:"create_user_name"  xorm:"nvarchar(255)"`
	Update_time      time.Time `json:"update_time"`
	Update_user_id   string    `json:"update_user_id"  xorm:"nvarchar(255)"`
	Update_user_name string    `json:"update_user_name"  xorm:"nvarchar(255)"`
	Is_available     bool      `json:"is_available"`
}

func GetAllInventory

func GetAllInventory() []*Inventory

func GetInventory

func GetInventory(code string) (*Inventory, error)

type Material_Inventory

type Material_Inventory struct {
	Id               int64     `json:"-"`
	Item_code        string    `json:"item_code"  xorm:"nvarchar(255)"`
	Inventory_code   string    `json:"inventory_code"  xorm:"varchar(128)"`
	Create_time      time.Time `json:"create_time"`
	Create_user_id   string    `json:"create_user_id"  xorm:"nvarchar(255)"`
	Create_user_name string    `json:"create_user_name"  xorm:"nvarchar(255)"`
	Update_time      time.Time `json:"update_time"`
	Update_user_id   string    `json:"update_user_id"  xorm:"nvarchar(255)"`
	Update_user_name string    `json:"update_user_name"  xorm:"nvarchar(255)"`
	Is_available     bool      `json:"is_available"`
}

type User

type User struct {
	Id           int64     `json:"-" `
	User_id      string    `json:"user_id" xorm:"varchar(50)"`
	User_name    string    `json:"user_name" xorm:"nvarchar(255)"`
	Password     string    `json:"-"  xorm:"nvarchar(255)"`
	Is_active    bool      `json:"is_active"`
	Is_superuser bool      `json:"-"`
	Is_stuff     bool      `json:"is_stuff"`
	Email        string    `json:"email" xorm:"nvarchar(255)"`
	Last_login   time.Time `json:"-"`
}

func GetUser

func GetUser(user_id string) (*User, error)

Jump to

Keyboard shortcuts

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