model

package
v1.2.140 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccount

func NewAccount() Entity

NewAccount is a factory method to create a new instance

Types

type Account

type Account struct {
	BaseEntityEx
	Name          string  `json:"name"`          // Account name
	EnName        string  `json:"enName"`        // Account english name
	Type          int     `json:"type"`          // Account type:  STUDENT | PRIVATE | BUSINESS ...
	Description   string  `json:"description"`   // Account description
	Status        int     `json:"status"`        // Account status: UNDEFINED | ACTIVE | INACTIVE | BLOCKED | SUSPENDED
	Phone         string  `json:"phone"`         // Office / Landline phone
	Mobile        string  `json:"mobile"`        // Mobile phone
	Email         string  `json:"email"`         // Email address
	Address       Address `json:"address"`       // Address
	CampaignId    string  `json:"campaignId"`    // Campaign Id
	CurrentCredit float64 `json:"currentCredit"` // Current account credit
	BaseRate      float64 `json:"baseRate"`      // Base rate for billing
	Discount      int     `json:"discount"`      // Permanent discount (percentage)
	InvoiceId     string  `json:"invoiceId"`     // Green invoice Id
}

Account entity is a billing account in the system @Entity: account

func (*Account) NAME

func (a *Account) NAME() string

func (*Account) TABLE

func (a *Account) TABLE() string

type Address

type Address struct {
	Street  string `json:"street"`  // Street address
	City    string `json:"city"`    // City
	State   string `json:"state"`   // State (if applicable)
	ZipCode string `json:"zipCode"` // Local zip code (postal cod)
	Country string `json:"country"` // Country name
}

Address model represents an address @Data

Jump to

Keyboard shortcuts

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