model

package
v0.0.0-...-bf83fb3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoreUserTypeApi         = "api"
	CoreUserTypeApp         = "app"
	CoreUserTypeApplication = "application"
	CoreUserTypeGuest       = "guest"
	CoreUserTypeSuper       = "super"
)
View Source
const (
	AppCodeArcimedes = AppCode("arcimedes")
	AppCodeCart      = AppCode("cart")
	AppCodeCore      = AppCode("core")

	DataStatusPending    = DataStatus("pending")
	DataStatusProcessing = DataStatus("processing")
	DataStatusProcessed  = DataStatus("processed")

	DataTypeCategory = DataType("category")
	// DataTypeCategoryList    = DataType("category-list")
	DataTypeCustomer        = DataType("customer")
	DataTypeCustomerList    = DataType("customer-list")
	DataTypeOrderLease      = DataType("order-lease")
	DataTypeProduct         = DataType("product")
	DataTypeProductList     = DataType("product-list")
	DataTypePurchase        = DataType("purchase")
	DataTypeRentalAsset     = DataType("rental-asset")
	DataTypeRentalAssetList = DataType("rental-asset-list")
	DataTypeUser            = DataType("user")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCode

type AppCode string

type CartOrder

type CartOrder struct {
	ID                int    `json:"id"`
	PurchaseOrderCode string `json:"purchaseOrderCode"`
}

CartOrder

type CartOrderLease

type CartOrderLease struct {
	ID                  int                   `json:"id"`
	OrderID             int                   `json:"orderId"`
	UserID              int                   `json:"userId"`
	RentalAssetID       int                   `json:"rentalAssetId"`
	PeriodID            int                   `json:"periodId"`
	Interval            int                   `json:"interval"`
	StatusCode          string                `json:"statusCode"`
	Price               float64               `json:"price"`
	Deposit             float64               `json:"deposit"`
	StartTime           int                   `json:"startTime"`
	EndTime             int                   `json:"endTime"`
	Cancellable         int                   `json:"cancellableTime"`
	LastInterval        int                   `json:"lastInterval"`
	NextYearMonth       int                   `json:"nextYearMonth"`
	DueDay              int                   `json:"dueDay"`
	AutoRenewStatusCode string                `json:"autoRenewStatusCode"`
	Properties          json.RawMessage       `json:"properties"`
	RentalAsset         CartRentalAsset       `json:"asset"`
	Period              CorePeriod            `json:"period"`
	Invoice             CartOrderLeaseInvoice `json:"invoice"`
	Order               CartOrder             `json:"order"`
}

CartOrderLease

type CartOrderLeaseInvoice

type CartOrderLeaseInvoice struct {
	ID            int     `json:"id"`
	LeaseID       int     `json:"leaseId"`
	Note          string  `json:"note"`
	Interval      int     `json:"interval"`
	DueTime       int     `json:"dueTime"`
	DueAmount     float64 `json:"dueAmount"`
	PastDueAmount float64 `json:"pastDueAmount"`
	PaidAmount    float64 `json:"paidAmount"`
	StatusCode    string  `json:"statusCode"`
	ErrorText     string  `json:"errorText"`
}

CartOrderLeaseInvoice

type CartRentalAsset

type CartRentalAsset struct {
	ID     int             `json:"id"`
	Code   string          `json:"code"`
	Name   string          `json:"name"`
	Desc   string          `json:"desc"`
	Status string          `json:"statusCode"`
	Ext    json.RawMessage `json:"_ext"`
}

CartRentalAsset

type CorePeriod

type CorePeriod struct {
	ID               int    `json:"id"`
	Code             string `json:"code"`
	Name             string `json:"name"`
	IntervalTypeCode string `json:"intervalTypeCode"`
	IntervalMax      int    `json:"intervalMax"`
}

CorePeriod

type CorePerson

type CorePerson struct {
	FirstName  string `json:"firstName"`
	MiddleName string `json:"middleName"`
	LastName   string `json:"lastName"`
}

CorePerson

type CoreUser

type CoreUser struct {
	ID        int        `json:"id"`
	AppCode   string     `json:"__appCd"`
	AppCoreID int        `json:"__appCoreId"`
	Username  string     `json:"username"`
	Email     string     `json:"email"`
	Type      string     `json:"typeCode"`
	Person    CorePerson `json:"person"`
}

CoreUser model

type Credential

type Credential struct {
	ID           int
	DeploymentID int
	Name         string
	ClientID     string
	ClientSecret string
}

Credential

type Data

type Data struct {
	DeploymentID int             `json:"-"`
	AppCode      AppCode         `json:"appCode"`
	AppCoreID    uint            `json:"appCoreId"`
	Type         DataType        `json:"objectType"`
	ObjectID     uint            `json:"objectId"`
	Status       DataStatus      `json:"status"`
	Object       json.RawMessage `json:"object"`
	Deleted      bool            `json:"deleted"`
	Hash         []byte          `json:"-"`
	CreatedOn    time.Time       `json:"-"`
	UpdatedOn    time.Time       `json:"-"`
}

Deployment

func (*Data) IsValidAppCode

func (d *Data) IsValidAppCode() bool

IsValidAppCode validates the app code

type DataStatus

type DataStatus string

type DataType

type DataType string

type Deployment

type Deployment struct {
	ID                 int
	Code               string
	ManageURL          string
	APIURL             string
	Name               string
	ClientID           string
	ClientSecret       string
	Token              string
	TokenExpiry        int
	RefreshToken       string
	RefreshTokenExpiry int
	LogEventCode       string
	LogPublishKey      string
}

Deployment

type DeploymentGrant

type DeploymentGrant struct {
	ID                 int
	DeploymentID       int
	ArcUserID          int
	CredentialID       int
	Token              string
	TokenExpiry        int
	RefreshToken       string
	RefreshTokenExpiry int
}

DeploymentGrant

Jump to

Keyboard shortcuts

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