models

package
v0.95.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: GPL-2.0 Imports: 1 Imported by: 4

Documentation

Overview

Package models provides the object models for haul requests and responses

Index

Constants

View Source
const Schema = `` /* 783-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	ID          int64      `db:"id, omitempty" json:"id"`
	Description string     `db:"description" json:"description"`
	Status      string     `db:"status" json:"status"`
	Target      int64      `db:"target" json:"target"`
	CreatedAt   *time.Time `db:"created_at" json:"created_at"`
	DeletedAt   *time.Time `db:"deleted_at, omitempty" json:"deleted_at"`
}

type AssetDetailed added in v0.74.0

type AssetDetailed struct {
	Asset
	TagsDetailed []TagDetailed
}

type AssetWithAttributes added in v0.46.0

type AssetWithAttributes struct {
	Asset      Asset
	Attributes []KeyValue
}

type Attribute added in v0.33.0

type Attribute struct {
	ID              int64      `db:"id, omitempty" json:"id"`
	Key             string     `db:"key" json:"key"`
	CreatedAt       *time.Time `db:"created_at" json:"created_at"`
	DeletedAt       *time.Time `db:"deleted_at, omitempty" json:"deleted_at"`
	AllowEmptyValue bool       `db:"allow_empty_value" json:"allow_empty_value"`
}

type Event

type Event struct {
	ID      int64      `db:"id, omitempty" json:"id"`
	At      *time.Time `db:"at" json:"at"`
	Content string     `db:"content" json:"content"`
}

type KeyValue added in v0.33.0

type KeyValue struct {
	Key   string `db:"key" json:"key"`
	Value string `db:"value" json:"value"`
}

type TabbyPrinter

type TabbyPrinter interface {
	TabbyPrint() error
}

type Tag

type Tag struct {
	ID          int64  `db:"id, omitempty" json:"id"`
	AssetID     int64  `db:"asset_id" json:"asset_id"`
	AttributeID int64  `db:"attribute_id" json:"attribute_id"`
	Value       string `db:"value" json:"value"`
}

Tag represents the asset_attributes relation table

type TagDetailed added in v0.78.0

type TagDetailed struct {
	Tag
	Key string `db:"key" json:"key"`
}

TagDetailed represents the asset_attributes relation table, including attibute keys

Jump to

Keyboard shortcuts

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