basic_types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DateFormat string = "02.01.2006 15:04:05"

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel uint
const (
	CUSTOMER AccessLevel = iota + 1
	OPERATOR
)

type Customer

type Customer struct {
	Id        uint
	FirstName string
	LastName  string
	Login     string
}

func (*Customer) AccessLevel

func (*Customer) AccessLevel() AccessLevel

func (*Customer) FullName

func (c *Customer) FullName() string

func (Customer) GetId

func (c Customer) GetId() uint

func (Customer) GetLogin

func (c Customer) GetLogin() string

type Employee

type Employee struct {
	Id        uint
	FirstName string
	LastName  string
	JobId     uint
	Login     string
}

func (*Employee) AccessLevel

func (e *Employee) AccessLevel() AccessLevel

func (*Employee) FullName

func (e *Employee) FullName() string

func (Employee) GetId

func (e Employee) GetId() uint

func (Employee) GetLogin

func (e Employee) GetLogin() string

type Entity

type Entity interface {
	FullName() string
	AccessLevel() AccessLevel
	GetId() uint
	GetLogin() string
}

type Material

type Material struct {
	Id    uint
	Title string
	Price float64
}

type Model

type Model struct {
	Id        uint
	Title     string
	Price     float64
	Materials map[uint]Material
	MatLeng   map[uint]float64
}

type Order

type Order struct {
	Id           uint
	CustomerId   uint
	CustomerName string
	EmployeeName string
	Status       OrderStatus
	TotalPrice   float64
	CreateDate   time.Time
	ReleaseDate  time.Time
}

type OrderItem

type OrderItem struct {
	Id        uint
	O_id      uint
	Model     Model
	UnitPrice float64
}

type OrderStatus

type OrderStatus uint
const (
	Pending OrderStatus = iota + 1
	Processing
	Released
	Canceled
)

func (OrderStatus) String

func (stat OrderStatus) String() string

Jump to

Keyboard shortcuts

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