model

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Street  string
	ZipCode string
	City    string
	State   string
}

type Adult

type Adult struct {
	Name             string
	Surname          string
	SecondSurname    string
	TaxID            string
	Role             string
	Address          Address
	Email            string
	MobilePhone      string
	HomePhone        string
	GrandMotherPhone string
	GrandParentPhone string
	WorkPhone        string
	BirthDate        time.Time
	Nationality      string
}

func (Adult) MobilePhoneFmt

func (a Adult) MobilePhoneFmt() string

func (Adult) NameSurnameFmt

func (a Adult) NameSurnameFmt() string

type Child

type Child struct {
	Code          int
	Name          string
	Surname       string
	SecondSurname string
	TaxID         string
	BirthDate     time.Time
	Group         string
	Note          string
	Active        bool
}

func (Child) NameAndSurname

func (c Child) NameAndSurname() string

func (Child) NameWithCode

func (c Child) NameWithCode() string

func (Child) String

func (c Child) String() string

type Consumption

type Consumption struct {
	Code            string
	ChildCode       int
	ProductID       string
	Units           float64
	YearMonth       string
	IsRectification bool
	InvoiceCode     string
}

func (Consumption) String

func (c Consumption) String() string

type Customer

type Customer struct {
	Id            int
	Active        bool
	Children      []Child
	Adults        []Adult
	InvoiceHolder InvoiceHolder
	Note          interface{}
	Language      string
}

func (Customer) ChildrenNames

func (c Customer) ChildrenNames(joinWith string) string

func (Customer) FirstAdult

func (c Customer) FirstAdult() Adult

func (Customer) FirstAdultName

func (c Customer) FirstAdultName() string

func (Customer) FirstAdultNameWithCode

func (c Customer) FirstAdultNameWithCode() string

func (Customer) String

func (c Customer) String() string

type Invoice

type Invoice struct {
	Code          string
	CustomerID    int
	Date          time.Time
	YearMonth     string
	ChildrenCodes []int
	Lines         []Line
	PaymentType   string
	Note          string
	Emailed       bool
	Printed       bool
	SentToBank    bool
}

func (Invoice) Amount

func (i Invoice) Amount() float64

func (Invoice) LinesFmt

func (i Invoice) LinesFmt(joinWith string) string

func (Invoice) PaymentFmt

func (i Invoice) PaymentFmt() string

func (Invoice) String

func (i Invoice) String() string

type InvoiceHolder

type InvoiceHolder struct {
	Name        string
	TaxID       string
	Address     Address
	Email       string
	SendEmail   bool
	PaymentType string
	BankAccount string
	IsBusiness  bool
}

func (InvoiceHolder) BankAccountFmt

func (i InvoiceHolder) BankAccountFmt() string

func (InvoiceHolder) Mail

func (i InvoiceHolder) Mail() string

func (InvoiceHolder) PaymentInfoFmt

func (i InvoiceHolder) PaymentInfoFmt() string

type Line

type Line struct {
	ProductID     string
	Units         float64
	ProductPrice  float64
	TaxPercentage float64
	ChildCode     int
}

type Product

type Product struct {
	Id            string
	Name          string
	ShortName     string
	Price         float64
	TaxPercentage float64
	IsSubsidy     bool
}

func (Product) String

func (p Product) String() string

Jump to

Keyboard shortcuts

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