mmodel

package
v1.27.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 1 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 {
	Line1   string  `json:"line1"`
	Line2   *string `json:"line2"`
	ZipCode string  `json:"zipCode"`
	City    string  `json:"city"`
	State   string  `json:"state"`
	Country string  `json:"country"` // According to ISO 3166-1 alpha-2
}

Address structure for marshaling/unmarshalling JSON.

type CreateLedgerInput

type CreateLedgerInput struct {
	Name     string         `json:"name" validate:"required,max=256"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`
}

CreateLedgerInput is a struct design to encapsulate request create payload data.

type CreateOrganizationInput

type CreateOrganizationInput struct {
	LegalName            string         `json:"legalName" validate:"required,max=256"`
	ParentOrganizationID *string        `json:"parentOrganizationId" validate:"omitempty,uuid"`
	DoingBusinessAs      *string        `json:"doingBusinessAs" validate:"max=256"`
	LegalDocument        string         `json:"legalDocument" validate:"required,max=256"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	Metadata             map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`
}

CreateOrganizationInput is a struct design to encapsulate request create payload data.

type Ledger

type Ledger struct {
	ID             string         `json:"id"`
	Name           string         `json:"name"`
	OrganizationID string         `json:"organizationId"`
	Status         Status         `json:"status"`
	CreatedAt      time.Time      `json:"createdAt"`
	UpdatedAt      time.Time      `json:"updatedAt"`
	DeletedAt      *time.Time     `json:"deletedAt" sql:"index"`
	Metadata       map[string]any `json:"metadata,omitempty"`
}

Ledger is a struct designed to encapsulate payload data.

type Ledgers

type Ledgers struct {
	Items []Ledger `json:"items"`
	Page  int      `json:"page"`
	Limit int      `json:"limit"`
}

type Organization

type Organization struct {
	ID                   string         `json:"id"`
	ParentOrganizationID *string        `json:"parentOrganizationId"`
	LegalName            string         `json:"legalName"`
	DoingBusinessAs      *string        `json:"doingBusinessAs"`
	LegalDocument        string         `json:"legalDocument"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	CreatedAt            time.Time      `json:"createdAt"`
	UpdatedAt            time.Time      `json:"updatedAt"`
	DeletedAt            *time.Time     `json:"deletedAt"`
	Metadata             map[string]any `json:"metadata,omitempty"`
}

Organization is a struct designed to encapsulate response payload data.

type Organizations

type Organizations struct {
	Items []Organization `json:"items"`
	Page  int            `json:"page"`
	Limit int            `json:"limit"`
}

type Status

type Status struct {
	Code        string  `json:"code" validate:"max=100"`
	Description *string `json:"description" validate:"omitempty,max=256"`
}

Status structure for marshaling/unmarshalling JSON.

type UpdateLedgerInput

type UpdateLedgerInput struct {
	Name     string         `json:"name" validate:"max=256"`
	Status   Status         `json:"status"`
	Metadata map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`
}

UpdateLedgerInput is a struct design to encapsulate request update payload data.

type UpdateOrganizationInput

type UpdateOrganizationInput struct {
	LegalName            string         `json:"legalName" validate:"required,max=256"`
	ParentOrganizationID *string        `json:"parentOrganizationId" validate:"omitempty,uuid"`
	DoingBusinessAs      *string        `json:"doingBusinessAs" validate:"max=256"`
	Address              Address        `json:"address"`
	Status               Status         `json:"status"`
	Metadata             map[string]any `json:"metadata" validate:"dive,keys,keymax=100,endkeys,nonested,valuemax=2000"`
}

UpdateOrganizationInput is a struct design to encapsulate request update payload data.

Jump to

Keyboard shortcuts

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