betypes

package
v0.0.0-...-b745f0c Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MongoUsername ...
	MongoUsername = "haski0071"
	// MongoPassword ...
	MongoPassword = "Haski12345"
	// MongoHostname ...
	MongoHostname = "172.18.0.2"
	// MongoPort ...
	MongoPort = "27017"
)

Variables

View Source
var (
	// BOT_TOKEN given by BotFather to use telegram API CRM_BOT_TOKEN
	BOT_TOKEN = "1324365499:AAFjGjP0fKcq3JcnTaoAYikz0DFS0BUbpKQ"
	// SECRET_VASSAL_PASSWORD to register new user SECRET_CRM_BOT_PASSWORD_FOR_VASSALS
	SECRET_VASSAL_PASSWORD = os.Getenv("SECRET_CRM_BOT_PASSWORD_FOR_VASSALS")
	// SECRET_LORD_PASSWORD to register new admin SECRET_CRM_BOT_PASSWORD_FOR_LORDS
	SECRET_LORD_PASSWORD = os.Getenv("SECRET_CRM_BOT_PASSWORD_FOR_LORDS")
)

Functions

This section is empty.

Types

type Cashbox

type Cashbox struct {
	ID           bson.ObjectId `bson:"_id,omitempty"`
	Type         string        `bson:"type"`
	Money        float64       `bson:"money"`
	Transactions []Transaction `bson:"transactions"`
}

type DailyCash

type DailyCash struct {
	ID    bson.ObjectId `bson:"_id,omitempty"`
	Money float64       `bson:"money"`
	User  string        `bson:"user"`
	Date  time.Time     `bson:"date"`
}

type Product

type Product struct {
	ID        bson.ObjectId `json:"-" bson:"_id,omitempty"`
	Name      string        `json:"name" bson:"name"`
	Type      string        `json:"type" bson:"type"`
	Unit      string        `bson:"unit"`
	Price     float64       `json:"price" bson:"price"`
	PrimeCost float64       `json:"prime-cost" bson:"prime_cost"`
	Margin    float64       `bson:"margin"`
	InStorage float64       `json:"in-storage" bson:"in_storage"`
	Purchases []Purchase    `json:"-" bson:"purchases"`
}

Product struct.

type Purchase

type Purchase struct {
	ID       bson.ObjectId `bson:"_id,omitempty"`
	Amount   float64       `bson:"amount"`
	SaleDate time.Time     `bson:"sale_date"`
	Seller   string        `bson:"seller"`
}

Purchase struct

type Transaction

type Transaction struct {
	ID       bson.ObjectId `bson:"_id,omitempty"`
	Author   string        `bson:"author"`
	Diff     float64       `bson:"diff"`
	DataTime time.Time     `bson:"data_time"`
	Comment  string        `bson:"comment"`
}

type User

type User struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	FirstName string        `bson:"first_name"`
	LastName  string        `bson:"last_name"`
	UserName  string        `bson:"username"`
	UserID    int           `bson:"user_id"`
	Status    string        `bson:"status"`
}

Jump to

Keyboard shortcuts

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