model

package
v0.0.0-...-0702a85 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 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 BranchesSale

type BranchesSale struct {
	StoreCode   int
	Totalamount float64
	StoreName   string
}

type BranchesSaleReq

type BranchesSaleReq struct {
	Year  uint `json:"year"`
	Month uint `json:"month"`
}

type Cashtry

type Cashtry struct {
	TotalCash   float64
	TotalOrder  int
	TVisa       float64
	TVoid       float64
	MonthNo     int
	AverageCash float64
	NoOfCashTry int
	AvgBasket   float64
}

type CashtryReq

type CashtryReq struct {
	Store uint `json:"store"`
	Year  uint `json:"year"`
}

type CashtryStores

type CashtryStores struct {
	StoreCode int    `json:"store_code"`
	StoreName string `json:"store_name"`
}

type MonthlySales

type MonthlySales struct {
	Totalamount float64
	DocMonth    int
}

type MonthlySalesReq

type MonthlySalesReq struct {
	Year uint `json:"Year"`
}

type Server

type Server struct {
	gorm.Model
	DbUser     string `gorm:"not null;unique" json:"DbUser"`
	DbPassword string `gorm:"not null" json:"DbPassword"`
	DbIP       string `gorm:"not null;unique" json:"DbIP"`
	DbName     string `gorm:"not null;unique" json:"DbName"`
	ServerName string `gorm:"not null;unique" json:"ServerName"`
	Users      []User
}

func (*Server) HashServerPassword

func (s *Server) HashServerPassword(plain string) (string, error)

type Topsale

type Topsale struct {
	ItemName    string
	TotalAmount float64
	TotalQnt    float64
	Profit      float64
	Disc        float64
}

type TopsaleReq

type TopsaleReq struct {
	Store uint `json:"store"`
	Year  uint `json:"year"`
	Month uint `json:"month"`
}

type User

type User struct {
	gorm.Model
	Email    string `gorm:"unique_index;not null"`
	Server   Server
	ServerID uint   `gorm:"foreignkey:SeverIdForeign"`
	Password string `gorm:"not null"`
}

func (*User) CheckPassword

func (u *User) CheckPassword(plain string) bool

func (*User) HashUserPassword

func (u *User) HashUserPassword(plain string) (string, error)

Jump to

Keyboard shortcuts

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