model

package
v0.0.0-...-3321fbd Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllRole = []Role{
	RoleAdmin,
	RoleUser,
}

Functions

This section is empty.

Types

type Global

type Global struct {
	// Currency Symbol
	Currency *string `json:"Currency,omitempty"`
	// VAT Rate, zero if no VAT
	Vat *int `json:"VAT,omitempty"`
}

type Login

type Login struct {
	// Username to login
	Username *string `json:"Username,omitempty"`
	// Password of the user
	Password *string `json:"Password,omitempty"`
}

type LoginSuccess

type LoginSuccess struct {
	// User that was logged in
	User *User `json:"User,omitempty"`
	// Login Status
	Success *bool `json:"Success,omitempty"`
	// Message on error
	Message *string `json:"Message,omitempty"`
}

type Mutation

type Mutation struct {
}

type Product

type Product struct {
	ID *string `json:"ID,omitempty"`
	// Name of the property
	Name       *string            `json:"Name,omitempty"`
	Category   *string            `json:"Category,omitempty"`
	Price      *float64           `json:"Price,omitempty"`
	CreatedAt  *string            `json:"CreatedAt,omitempty"`
	Properties []*ProductProperty `json:"Properties,omitempty"`
}

type ProductCreationSuccess

type ProductCreationSuccess struct {
	// Creation Status
	Success *bool `json:"Success,omitempty"`
	// Message on error
	Message *string `json:"Message,omitempty"`
	// Newly created product
	Product *Product `json:"Product,omitempty"`
}

type ProductInput

type ProductInput struct {
	// Name of the property
	Name     *string  `json:"Name,omitempty"`
	Category *string  `json:"Category,omitempty"`
	Price    *float64 `json:"Price,omitempty"`
}

type ProductProperty

type ProductProperty struct {
	ID *string `json:"ID,omitempty"`
	// Name of the property
	Name *string `json:"Name,omitempty"`
	// Value of the property
	Value *string `json:"Value,omitempty"`
}

type Query

type Query struct {
}

type RegistrationSuccess

type RegistrationSuccess struct {
	// Registration Status
	Success *bool `json:"success,omitempty"`
	// Message on error
	Message *string `json:"Message,omitempty"`
}

type Role

type Role string
const (
	RoleAdmin Role = "ADMIN"
	RoleUser  Role = "USER"
)

func (Role) IsValid

func (e Role) IsValid() bool

func (Role) MarshalGQL

func (e Role) MarshalGQL(w io.Writer)

func (Role) String

func (e Role) String() string

func (*Role) UnmarshalGQL

func (e *Role) UnmarshalGQL(v interface{}) error

type Success

type Success struct {
	// Status
	Success *bool `json:"Success,omitempty"`
	// Message on error
	Message *string `json:"Message,omitempty"`
}

type User

type User struct {
	FirstName *string `json:"FirstName,omitempty"`
	LastName  *string `json:"LastName,omitempty"`
	Mail      *string `json:"Mail,omitempty"`
	Phone     *string `json:"Phone,omitempty"`
	Username  *string `json:"Username,omitempty"`
}

type UserRegistration

type UserRegistration struct {
	FirstName *string `json:"FirstName,omitempty"`
	LastName  *string `json:"LastName,omitempty"`
	Mail      *string `json:"Mail,omitempty"`
	Phone     *string `json:"Phone,omitempty"`
	Username  *string `json:"Username,omitempty"`
	Password  *string `json:"Password,omitempty"`
}

Jump to

Keyboard shortcuts

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