model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Collection

type Collection struct {
	ID      common.ID   `json:"id"`
	Name    string      `json:"name"`
	UserID  common.ID   `json:"userID"`
	Records []*QRRecord `json:"records"`
}

type Notification

type Notification struct {
	Type NotificationType `json:"type"`
}

type NotificationType

type NotificationType string
const (
	NotificationTypeUnknown           NotificationType = "unknown"
	NotificationTypeTeaExpiration     NotificationType = "teaExpiration"
	NotificationTypeTeaRecommendation NotificationType = "teaRecommendation"
)

func (*NotificationType) FromCommon

func (t *NotificationType) FromCommon(data common.NotificationType)

func (NotificationType) IsValid

func (e NotificationType) IsValid() bool

func (NotificationType) MarshalGQL

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

func (NotificationType) String

func (e NotificationType) String() string

func (*NotificationType) UnmarshalGQL

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

type QRRecord

type QRRecord struct {
	ID             common.ID `json:"id"`
	Tea            *Tea      `json:"tea"`
	BowlingTemp    int       `json:"bowlingTemp"`
	ExpirationDate time.Time `json:"expirationDate"`
}

type QRRecordData

type QRRecordData struct {
	Tea            common.ID `json:"tea"`
	BowlingTemp    int       `json:"bowlingTemp"`
	ExpirationDate time.Time `json:"expirationDate"`
}

type Session

type Session struct {
	Token     string    `json:"token"`
	ExpiredAt time.Time `json:"expiredAt"`
}

type Tag

type Tag struct {
	ID       common.ID    `json:"id"`
	Name     string       `json:"name"`
	Color    string       `json:"color"`
	Category *TagCategory `json:"category"`
}

type TagCategory

type TagCategory struct {
	ID   common.ID `json:"id"`
	Name string    `json:"name"`
	Tags []*Tag    `json:"tags"`
}

type Tea

type Tea struct {
	ID          common.ID `json:"id"`
	Name        string    `json:"name"`
	Type        Type      `json:"type"`
	Description string    `json:"description"`
	Tags        []*Tag    `json:"tags"`
}

func FromCommonTea

func FromCommonTea(source *common.Tea) *Tea

func (*Tea) ToCommonTea

func (t *Tea) ToCommonTea() common.Tea

type TeaData

type TeaData struct {
	Name        string `json:"name"`
	Type        Type   `json:"type"`
	Description string `json:"description"`
}

func (*TeaData) ToCommonTeaData

func (t *TeaData) ToCommonTeaData() *common.TeaData

type Type

type Type string
const (
	TypeUnknown Type = "unknown"
	TypeTea     Type = "tea"
	TypeCoffee  Type = "coffee"
	TypeHerb    Type = "herb"
	TypeOther   Type = "other"
)

func FromBeverageType

func FromBeverageType(bt common.BeverageType) Type

func (Type) IsValid

func (e Type) IsValid() bool

func (Type) MarshalGQL

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

func (Type) String

func (e Type) String() string

func (Type) ToBeverageType

func (t Type) ToBeverageType() common.BeverageType

func (*Type) UnmarshalGQL

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

type User

type User struct {
	TokenExpiredAt time.Time       `json:"tokenExpiredAt"`
	Collections    []*Collection   `json:"collections"`
	Notifications  []*Notification `json:"notifications"`
}

Jump to

Keyboard shortcuts

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