entities

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Brand

type Brand struct {
	Description string  `json:"description"`
	Id          int64   `json:"id" gorm:"primaryKey;autoIncrement:false"`
	Image       *string `json:"image"`
	Name        string  `json:"name"`
}

type DateTime

type DateTime struct {
	lkdr.DateTime
}

func (DateTime) GormDataType

func (dt DateTime) GormDataType() string

func (*DateTime) Scan

func (dt *DateTime) Scan(value any) error

func (DateTime) Value

func (dt DateTime) Value() (driver.Value, error)

type DateTimeTZ

type DateTimeTZ struct {
	lkdr.DateTimeTZ
}

func (DateTimeTZ) GormDataType

func (dt DateTimeTZ) GormDataType() string

func (*DateTimeTZ) Scan

func (dt *DateTimeTZ) Scan(value any) error

func (DateTimeTZ) Value

func (dt DateTimeTZ) Value() (driver.Value, error)

type Device

type Device struct {
	UserPhone string `gorm:"primaryKey"`
	User      User   `gorm:"constraint:OnDelete:CASCADE"`

	Id string
}

type FiscalData

type FiscalData struct {
	ReceiptKey string  `json:"-" gorm:"primaryKey"`
	Receipt    Receipt `json:"-" gorm:"constraint:OnDelete:CASCADE"`

	BuyerAddress            string           `json:"buyerAddress"`
	CashTotalSum            float64          `json:"cashTotalSum"`
	CreditSum               float64          `json:"creditSum"`
	DateTime                DateTime         `json:"dateTime"`
	EcashTotalSum           float64          `json:"ecashTotalSum"`
	FiscalDocumentFormatVer string           `json:"fiscalDocumentFormatVer"`
	FiscalDocumentNumber    int64            `json:"fiscalDocumentNumber"`
	FiscalDriveNumber       string           `json:"fiscalDriveNumber"`
	FiscalSign              string           `json:"fiscalSign"`
	InternetSign            *int             `json:"internetSign"`
	Items                   []FiscalDataItem `json:"items" gorm:"constraint:OnDelete:CASCADE;foreignKey:ReceiptKey"`
	KktRegId                string           `json:"kktRegId"`
	MachineNumber           *string          `json:"machineNumber"`
	Nds10                   *float64         `json:"nds10"`
	Nds18                   *float64         `json:"nds18"`
	OperationType           int              `json:"operationType"`
	Operator                *string          `json:"operator"`
	PrepaidSum              float64          `json:"prepaidSum"`
	ProvisionSum            float64          `json:"provisionSum"`
	RequestNumber           int64            `json:"requestNumber"`
	RetailPlace             string           `json:"retailPlace"`
	RetailPlaceAddress      *string          `json:"retailPlaceAddress"`
	ShiftNumber             int64            `json:"shiftNumber"`
	TaxationType            int              `json:"taxationType"`
	TotalSum                float64          `json:"totalSum"`
	User                    *string          `json:"user"`
	UserInn                 string           `json:"userInn"`
}

func (FiscalData) TableName

func (fd FiscalData) TableName() string

type FiscalDataItem

type FiscalDataItem struct {
	ReceiptKey string `json:"-" gorm:"primaryKey"`
	DbIdx      int    `json:"dbIdx" gorm:"primaryKey"`

	Name        string  `json:"name"`
	Nds         int     `json:"nds"`
	PaymentType int     `json:"paymentType"`
	Price       float64 `json:"price"`
	ProductType int     `json:"productType"`
	ProviderInn *string `json:"providerInn"`
	Quantity    float64 `json:"quantity"`
	Sum         float64 `json:"sum"`
}

type Receipt

type Receipt struct {
	UserPhone string `json:"-" gorm:"index"`
	User      User   `json:"-" gorm:"constraint:OnDelete:CASCADE"`

	BrandId *int64 `json:"brandId" gorm:"index"`
	Brand   *Brand `json:"-" gorm:"constraint:OnDelete:CASCADE"`

	Buyer                string   `json:"buyer"`
	BuyerType            string   `json:"buyerType"`
	CreatedDate          DateTime `json:"createdDate" gorm:"index"`
	FiscalDocumentNumber string   `json:"fiscalDocumentNumber"`
	FiscalDriveNumber    string   `json:"fiscalDriveNumber"`
	Key                  string   `json:"key" gorm:"primaryKey"`
	KktOwner             string   `json:"kktOwner"`
	KktOwnerInn          string   `json:"kktOwnerInn"`
	ReceiveDate          DateTime `json:"receiveDate" gorm:"index"`
	TotalSum             string   `json:"totalSum"`
}

func (Receipt) TableName

func (r Receipt) TableName() string

type Tokens

type Tokens struct {
	UserPhone string `json:"-" gorm:"primaryKey"`
	User      User   `json:"-" gorm:"constraint:OnDelete:CASCADE"`

	RefreshToken          string      `json:"refreshToken"`
	RefreshTokenExpiresIn *DateTimeTZ `json:"refreshTokenExpiresIn,omitempty"`
	Token                 string      `json:"token"`
	TokenExpireIn         DateTimeTZ  `json:"tokenExpireIn"`
}

type User

type User struct {
	Phone string `gorm:"primaryKey"`
	Name  string `gorm:"index"`
}

Jump to

Keyboard shortcuts

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