sqlc

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddImageToReviewParams

type AddImageToReviewParams struct {
	Review    uuid.UUID `json:"review"`
	ImageHash string    `json:"image_hash"`
}

type AddMultipleImagesToReviewParams

type AddMultipleImagesToReviewParams struct {
	Review    uuid.UUID `json:"review"`
	ImageHash string    `json:"image_hash"`
}

type AddMultipleOccurrenceSideDishesParams

type AddMultipleOccurrenceSideDishesParams struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Dish       uuid.UUID `json:"dish"`
}

type AddMultipleOccurrenceTagsParams

type AddMultipleOccurrenceTagsParams struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Tag        string    `json:"tag"`
}

type AddOccurrenceSideDishParams

type AddOccurrenceSideDishParams struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Dish       uuid.UUID `json:"dish"`
}

type AddOccurrenceTagParams

type AddOccurrenceTagParams struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Tag        string    `json:"tag"`
}

type CreateDishAliasParams

type CreateDishAliasParams struct {
	AliasName           string    `json:"alias_name"`
	NormalizedAliasName string    `json:"normalized_alias_name"`
	Dish                uuid.UUID `json:"dish"`
}

type CreateDishParams

type CreateDishParams struct {
	NameDe string         `json:"name_de"`
	NameEn sql.NullString `json:"name_en"`
}

type CreateOccurrenceParams

type CreateOccurrenceParams struct {
	Location      uuid.UUID        `json:"location"`
	Dish          uuid.UUID        `json:"dish"`
	Date          time.Time        `json:"date"`
	Status        OccurrenceStatus `json:"status"`
	Kj            sql.NullInt32    `json:"kj"`
	Kcal          sql.NullInt32    `json:"kcal"`
	Fat           sql.NullInt32    `json:"fat"`
	SaturatedFat  sql.NullInt32    `json:"saturated_fat"`
	Carbohydrates sql.NullInt32    `json:"carbohydrates"`
	Sugar         sql.NullInt32    `json:"sugar"`
	Fiber         sql.NullInt32    `json:"fiber"`
	Protein       sql.NullInt32    `json:"protein"`
	Salt          sql.NullInt32    `json:"salt"`
	PriceStudent  sql.NullInt32    `json:"price_student"`
	PriceStaff    sql.NullInt32    `json:"price_staff"`
	PriceGuest    sql.NullInt32    `json:"price_guest"`
}

type CreateReviewParams

type CreateReviewParams struct {
	Occurrence  uuid.UUID      `json:"occurrence"`
	DisplayName sql.NullString `json:"display_name"`
	Stars       int32          `json:"stars"`
	Text        sql.NullString `json:"text"`
}

type CreateTagParams

type CreateTagParams struct {
	Key         string         `json:"key"`
	Name        string         `json:"name"`
	Description string         `json:"description"`
	ShortName   sql.NullString `json:"short_name"`
	Priority    Priority       `json:"priority"`
	IsAllergy   bool           `json:"is_allergy"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}

type Dish

type Dish struct {
	ID     uuid.UUID      `json:"id"`
	NameDe string         `json:"name_de"`
	NameEn sql.NullString `json:"name_en"`
}

type DishAlias

type DishAlias struct {
	AliasName           string    `json:"alias_name"`
	NormalizedAliasName string    `json:"normalized_alias_name"`
	Dish                uuid.UUID `json:"dish"`
}

type GetDishReviewMetadataParams

type GetDishReviewMetadataParams struct {
	ID       uuid.UUID    `json:"id"`
	Approved sql.NullBool `json:"approved"`
}

type GetDishReviewMetadataRow

type GetDishReviewMetadataRow struct {
	AverageStars pgtype.Numeric `json:"average_stars"`
	ReviewCount  int64          `json:"review_count"`
}

type GetDishReviewsParams

type GetDishReviewsParams struct {
	ID       uuid.UUID    `json:"id"`
	Approved sql.NullBool `json:"approved"`
}

type GetFilteredOccurrencesParams

type GetFilteredOccurrencesParams struct {
	StartDate sql.NullTime         `json:"startDate"`
	EndDate   sql.NullTime         `json:"endDate"`
	Location  uuid.NullUUID        `json:"location"`
	Status    NullOccurrenceStatus `json:"status"`
}

type GetOccurrenceReviewMetadataParams

type GetOccurrenceReviewMetadataParams struct {
	Occurrence uuid.UUID    `json:"occurrence"`
	Approved   sql.NullBool `json:"approved"`
}

type GetOccurrenceReviewMetadataRow

type GetOccurrenceReviewMetadataRow struct {
	AverageStars pgtype.Numeric `json:"average_stars"`
	ReviewCount  int64          `json:"review_count"`
}

type GetOccurrenceReviewsParams

type GetOccurrenceReviewsParams struct {
	ID       uuid.UUID    `json:"id"`
	Approved sql.NullBool `json:"approved"`
}

type Image

type Image struct {
	ID        uuid.UUID `json:"id"`
	ImageHash string    `json:"image_hash"`
	Review    uuid.UUID `json:"review"`
}

type Location

type Location struct {
	ID         uuid.UUID `json:"id"`
	ExternalID int32     `json:"external_id"`
	Name       string    `json:"name"`
}

type NullOccurrenceStatus

type NullOccurrenceStatus struct {
	OccurrenceStatus OccurrenceStatus
	Valid            bool // Valid is true if String is not NULL
}

func (*NullOccurrenceStatus) Scan

func (ns *NullOccurrenceStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullOccurrenceStatus) Value

func (ns NullOccurrenceStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPriority

type NullPriority struct {
	Priority Priority
	Valid    bool // Valid is true if String is not NULL
}

func (*NullPriority) Scan

func (ns *NullPriority) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPriority) Value

func (ns NullPriority) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Occurrence

type Occurrence struct {
	ID            uuid.UUID        `json:"id"`
	Location      uuid.UUID        `json:"location"`
	Dish          uuid.UUID        `json:"dish"`
	Date          time.Time        `json:"date"`
	Status        OccurrenceStatus `json:"status"`
	Kj            sql.NullInt32    `json:"kj"`
	Kcal          sql.NullInt32    `json:"kcal"`
	Fat           sql.NullInt32    `json:"fat"`
	SaturatedFat  sql.NullInt32    `json:"saturated_fat"`
	Carbohydrates sql.NullInt32    `json:"carbohydrates"`
	Sugar         sql.NullInt32    `json:"sugar"`
	Fiber         sql.NullInt32    `json:"fiber"`
	Protein       sql.NullInt32    `json:"protein"`
	Salt          sql.NullInt32    `json:"salt"`
	PriceStudent  sql.NullInt32    `json:"price_student"`
	PriceStaff    sql.NullInt32    `json:"price_staff"`
	PriceGuest    sql.NullInt32    `json:"price_guest"`
}

type OccurrenceSideDish

type OccurrenceSideDish struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Dish       uuid.UUID `json:"dish"`
}

type OccurrenceStatus

type OccurrenceStatus string
const (
	OccurrenceStatusCONFIRMED        OccurrenceStatus = "CONFIRMED"
	OccurrenceStatusAPPROVED         OccurrenceStatus = "APPROVED"
	OccurrenceStatusAWAITINGAPPROVAL OccurrenceStatus = "AWAITING_APPROVAL"
	OccurrenceStatusUPDATED          OccurrenceStatus = "UPDATED"
	OccurrenceStatusPENDINGDELETION  OccurrenceStatus = "PENDING_DELETION"
)

func (*OccurrenceStatus) Scan

func (e *OccurrenceStatus) Scan(src interface{}) error

type OccurrenceTag

type OccurrenceTag struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Tag        string    `json:"tag"`
}

type Priority

type Priority string
const (
	PriorityHIDE   Priority = "HIDE"
	PriorityLOW    Priority = "LOW"
	PriorityMEDIUM Priority = "MEDIUM"
	PriorityHIGH   Priority = "HIGH"
)

func (*Priority) Scan

func (e *Priority) Scan(src interface{}) error

type Querier

type Querier interface {
	AddImageToReview(ctx context.Context, arg *AddImageToReviewParams) (*Image, error)
	AddMultipleImagesToReview(ctx context.Context, arg []*AddMultipleImagesToReviewParams) (int64, error)
	AddMultipleOccurrenceSideDishes(ctx context.Context, arg []*AddMultipleOccurrenceSideDishesParams) (int64, error)
	AddMultipleOccurrenceTags(ctx context.Context, arg []*AddMultipleOccurrenceTagsParams) (int64, error)
	AddOccurrenceSideDish(ctx context.Context, arg *AddOccurrenceSideDishParams) (*OccurrenceSideDish, error)
	AddOccurrenceTag(ctx context.Context, arg *AddOccurrenceTagParams) (*OccurrenceTag, error)
	CreateDish(ctx context.Context, arg *CreateDishParams) (*Dish, error)
	CreateDishAlias(ctx context.Context, arg *CreateDishAliasParams) (*DishAlias, error)
	CreateOccurrence(ctx context.Context, arg *CreateOccurrenceParams) (*Occurrence, error)
	CreateReview(ctx context.Context, arg *CreateReviewParams) (*Review, error)
	CreateTag(ctx context.Context, arg *CreateTagParams) (*Tag, error)
	DeleteDishAlias(ctx context.Context, aliasName string) (*DishAlias, error)
	DeleteImage(ctx context.Context, id uuid.UUID) (*Image, error)
	DeleteOccurrence(ctx context.Context, id uuid.UUID) (*Occurrence, error)
	DeleteReview(ctx context.Context, id uuid.UUID) (*Review, error)
	GetAliasesForDish(ctx context.Context, dish uuid.UUID) ([]string, error)
	GetAllAliases(ctx context.Context) ([]*DishAlias, error)
	GetAllDishes(ctx context.Context) ([]*Dish, error)
	GetAllImages(ctx context.Context) ([]*Image, error)
	GetAllLocations(ctx context.Context) ([]*Location, error)
	GetAllOccurrences(ctx context.Context) ([]*Occurrence, error)
	GetAllReviews(ctx context.Context, approved sql.NullBool) ([]*Review, error)
	GetAllTags(ctx context.Context) ([]*Tag, error)
	GetDishByID(ctx context.Context, id uuid.UUID) (*Dish, error)
	GetDishReviewMetadata(ctx context.Context, arg *GetDishReviewMetadataParams) (*GetDishReviewMetadataRow, error)
	GetDishReviews(ctx context.Context, arg *GetDishReviewsParams) ([]*Review, error)
	GetFilteredOccurrences(ctx context.Context, arg *GetFilteredOccurrencesParams) ([]*Occurrence, error)
	GetImageByID(ctx context.Context, id uuid.UUID) (*Image, error)
	GetImageHashByID(ctx context.Context, id uuid.UUID) (string, error)
	GetImagesByDish(ctx context.Context, id uuid.UUID) ([]*Image, error)
	GetImagesByOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error)
	GetImagesByReview(ctx context.Context, id uuid.UUID) ([]*Image, error)
	GetImagesForOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error)
	GetLocationByID(ctx context.Context, id uuid.UUID) (*Location, error)
	GetOccurrenceByID(ctx context.Context, id uuid.UUID) (*Occurrence, error)
	GetOccurrenceReviewMetadata(ctx context.Context, arg *GetOccurrenceReviewMetadataParams) (*GetOccurrenceReviewMetadataRow, error)
	GetOccurrenceReviews(ctx context.Context, arg *GetOccurrenceReviewsParams) ([]*Review, error)
	GetOccurrencesAfterInclusiveDate(ctx context.Context, date time.Time) ([]*Occurrence, error)
	GetOccurrencesByDate(ctx context.Context, date time.Time) ([]*Occurrence, error)
	GetReviewByID(ctx context.Context, id uuid.UUID) (*Review, error)
	GetReviewByImage(ctx context.Context, id uuid.UUID) (*Review, error)
	GetSideDishesForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Dish, error)
	GetTagByKey(ctx context.Context, key string) (*Tag, error)
	GetTagsForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Tag, error)
	GetUserByEmail(ctx context.Context, email string) (*User, error)
	GetUserByID(ctx context.Context, id uuid.UUID) (*User, error)
	RemoveOccurrenceSideDish(ctx context.Context, arg *RemoveOccurrenceSideDishParams) (*OccurrenceSideDish, error)
	RemoveOccurrenceTag(ctx context.Context, arg *RemoveOccurrenceTagParams) (*OccurrenceTag, error)
	SetReviewApproval(ctx context.Context, arg *SetReviewApprovalParams) (*Review, error)
	UpdateDish(ctx context.Context, arg *UpdateDishParams) (*Dish, error)
	UpdateDishAlias(ctx context.Context, arg *UpdateDishAliasParams) (*DishAlias, error)
	UpdateOccurrence(ctx context.Context, arg *UpdateOccurrenceParams) (*Occurrence, error)
	UpdateReview(ctx context.Context, arg *UpdateReviewParams) (*Review, error)
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) AddImageToReview

func (q *Queries) AddImageToReview(ctx context.Context, arg *AddImageToReviewParams) (*Image, error)

func (*Queries) AddMultipleImagesToReview

func (q *Queries) AddMultipleImagesToReview(ctx context.Context, arg []*AddMultipleImagesToReviewParams) (int64, error)

func (*Queries) AddMultipleOccurrenceSideDishes

func (q *Queries) AddMultipleOccurrenceSideDishes(ctx context.Context, arg []*AddMultipleOccurrenceSideDishesParams) (int64, error)

func (*Queries) AddMultipleOccurrenceTags

func (q *Queries) AddMultipleOccurrenceTags(ctx context.Context, arg []*AddMultipleOccurrenceTagsParams) (int64, error)

func (*Queries) AddOccurrenceSideDish

func (q *Queries) AddOccurrenceSideDish(ctx context.Context, arg *AddOccurrenceSideDishParams) (*OccurrenceSideDish, error)

func (*Queries) AddOccurrenceTag

func (q *Queries) AddOccurrenceTag(ctx context.Context, arg *AddOccurrenceTagParams) (*OccurrenceTag, error)

func (*Queries) CreateDish

func (q *Queries) CreateDish(ctx context.Context, arg *CreateDishParams) (*Dish, error)

func (*Queries) CreateDishAlias

func (q *Queries) CreateDishAlias(ctx context.Context, arg *CreateDishAliasParams) (*DishAlias, error)

func (*Queries) CreateOccurrence

func (q *Queries) CreateOccurrence(ctx context.Context, arg *CreateOccurrenceParams) (*Occurrence, error)

func (*Queries) CreateReview

func (q *Queries) CreateReview(ctx context.Context, arg *CreateReviewParams) (*Review, error)

func (*Queries) CreateTag

func (q *Queries) CreateTag(ctx context.Context, arg *CreateTagParams) (*Tag, error)

func (*Queries) DeleteDishAlias

func (q *Queries) DeleteDishAlias(ctx context.Context, aliasName string) (*DishAlias, error)

func (*Queries) DeleteImage

func (q *Queries) DeleteImage(ctx context.Context, id uuid.UUID) (*Image, error)

func (*Queries) DeleteOccurrence

func (q *Queries) DeleteOccurrence(ctx context.Context, id uuid.UUID) (*Occurrence, error)

func (*Queries) DeleteReview

func (q *Queries) DeleteReview(ctx context.Context, id uuid.UUID) (*Review, error)

func (*Queries) GetAliasesForDish

func (q *Queries) GetAliasesForDish(ctx context.Context, dish uuid.UUID) ([]string, error)

func (*Queries) GetAllAliases

func (q *Queries) GetAllAliases(ctx context.Context) ([]*DishAlias, error)

func (*Queries) GetAllDishes

func (q *Queries) GetAllDishes(ctx context.Context) ([]*Dish, error)

func (*Queries) GetAllImages

func (q *Queries) GetAllImages(ctx context.Context) ([]*Image, error)

func (*Queries) GetAllLocations

func (q *Queries) GetAllLocations(ctx context.Context) ([]*Location, error)

func (*Queries) GetAllOccurrences

func (q *Queries) GetAllOccurrences(ctx context.Context) ([]*Occurrence, error)

func (*Queries) GetAllReviews

func (q *Queries) GetAllReviews(ctx context.Context, approved sql.NullBool) ([]*Review, error)

func (*Queries) GetAllTags

func (q *Queries) GetAllTags(ctx context.Context) ([]*Tag, error)

func (*Queries) GetDishByID

func (q *Queries) GetDishByID(ctx context.Context, id uuid.UUID) (*Dish, error)

func (*Queries) GetDishReviewMetadata

func (q *Queries) GetDishReviewMetadata(ctx context.Context, arg *GetDishReviewMetadataParams) (*GetDishReviewMetadataRow, error)

func (*Queries) GetDishReviews

func (q *Queries) GetDishReviews(ctx context.Context, arg *GetDishReviewsParams) ([]*Review, error)

func (*Queries) GetFilteredOccurrences

func (q *Queries) GetFilteredOccurrences(ctx context.Context, arg *GetFilteredOccurrencesParams) ([]*Occurrence, error)

func (*Queries) GetImageByID

func (q *Queries) GetImageByID(ctx context.Context, id uuid.UUID) (*Image, error)

func (*Queries) GetImageHashByID added in v0.4.0

func (q *Queries) GetImageHashByID(ctx context.Context, id uuid.UUID) (string, error)

func (*Queries) GetImagesByDish

func (q *Queries) GetImagesByDish(ctx context.Context, id uuid.UUID) ([]*Image, error)

func (*Queries) GetImagesByOccurrence

func (q *Queries) GetImagesByOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error)

func (*Queries) GetImagesByReview

func (q *Queries) GetImagesByReview(ctx context.Context, id uuid.UUID) ([]*Image, error)

func (*Queries) GetImagesForOccurrence

func (q *Queries) GetImagesForOccurrence(ctx context.Context, id uuid.UUID) ([]*Image, error)

func (*Queries) GetLocationByID

func (q *Queries) GetLocationByID(ctx context.Context, id uuid.UUID) (*Location, error)

func (*Queries) GetOccurrenceByID

func (q *Queries) GetOccurrenceByID(ctx context.Context, id uuid.UUID) (*Occurrence, error)

func (*Queries) GetOccurrenceReviews

func (q *Queries) GetOccurrenceReviews(ctx context.Context, arg *GetOccurrenceReviewsParams) ([]*Review, error)

func (*Queries) GetOccurrencesAfterInclusiveDate

func (q *Queries) GetOccurrencesAfterInclusiveDate(ctx context.Context, date time.Time) ([]*Occurrence, error)

func (*Queries) GetOccurrencesByDate

func (q *Queries) GetOccurrencesByDate(ctx context.Context, date time.Time) ([]*Occurrence, error)

func (*Queries) GetReviewByID

func (q *Queries) GetReviewByID(ctx context.Context, id uuid.UUID) (*Review, error)

func (*Queries) GetReviewByImage

func (q *Queries) GetReviewByImage(ctx context.Context, id uuid.UUID) (*Review, error)

func (*Queries) GetSideDishesForOccurrence

func (q *Queries) GetSideDishesForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Dish, error)

func (*Queries) GetTagByKey

func (q *Queries) GetTagByKey(ctx context.Context, key string) (*Tag, error)

func (*Queries) GetTagsForOccurrence

func (q *Queries) GetTagsForOccurrence(ctx context.Context, occurrence uuid.UUID) ([]*Tag, error)

func (*Queries) GetUserByEmail

func (q *Queries) GetUserByEmail(ctx context.Context, email string) (*User, error)

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, id uuid.UUID) (*User, error)

func (*Queries) RemoveOccurrenceSideDish

func (q *Queries) RemoveOccurrenceSideDish(ctx context.Context, arg *RemoveOccurrenceSideDishParams) (*OccurrenceSideDish, error)

func (*Queries) RemoveOccurrenceTag

func (q *Queries) RemoveOccurrenceTag(ctx context.Context, arg *RemoveOccurrenceTagParams) (*OccurrenceTag, error)

func (*Queries) SetReviewApproval

func (q *Queries) SetReviewApproval(ctx context.Context, arg *SetReviewApprovalParams) (*Review, error)

func (*Queries) UpdateDish

func (q *Queries) UpdateDish(ctx context.Context, arg *UpdateDishParams) (*Dish, error)

func (*Queries) UpdateDishAlias

func (q *Queries) UpdateDishAlias(ctx context.Context, arg *UpdateDishAliasParams) (*DishAlias, error)

func (*Queries) UpdateOccurrence

func (q *Queries) UpdateOccurrence(ctx context.Context, arg *UpdateOccurrenceParams) (*Occurrence, error)

func (*Queries) UpdateReview

func (q *Queries) UpdateReview(ctx context.Context, arg *UpdateReviewParams) (*Review, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RemoveOccurrenceSideDishParams

type RemoveOccurrenceSideDishParams struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Dish       uuid.UUID `json:"dish"`
}

type RemoveOccurrenceTagParams

type RemoveOccurrenceTagParams struct {
	Occurrence uuid.UUID `json:"occurrence"`
	Tag        string    `json:"tag"`
}

type Review

type Review struct {
	ID          uuid.UUID      `json:"id"`
	Occurrence  uuid.UUID      `json:"occurrence"`
	DisplayName sql.NullString `json:"display_name"`
	Stars       int32          `json:"stars"`
	Text        sql.NullString `json:"text"`
	CreatedAt   time.Time      `json:"created_at"`
	UpdatedAt   time.Time      `json:"updated_at"`
	AcceptedAt  sql.NullTime   `json:"accepted_at"`
}

type SetReviewApprovalParams

type SetReviewApprovalParams struct {
	AcceptedAt sql.NullTime `json:"accepted_at"`
	ID         uuid.UUID    `json:"id"`
}

type Tag

type Tag struct {
	Key         string         `json:"key"`
	Name        string         `json:"name"`
	Description string         `json:"description"`
	ShortName   sql.NullString `json:"short_name"`
	Priority    Priority       `json:"priority"`
	IsAllergy   bool           `json:"is_allergy"`
}

type UpdateDishAliasParams

type UpdateDishAliasParams struct {
	AliasName           string         `json:"alias_name"`
	NewAliasName        sql.NullString `json:"new_alias_name"`
	NormalizedAliasName sql.NullString `json:"normalized_alias_name"`
	Dish                uuid.NullUUID  `json:"dish"`
}

type UpdateDishParams

type UpdateDishParams struct {
	ID     uuid.UUID      `json:"id"`
	NameDe sql.NullString `json:"name_de"`
	NameEn sql.NullString `json:"name_en"`
}

type UpdateOccurrenceParams

type UpdateOccurrenceParams struct {
	ID            uuid.UUID            `json:"id"`
	Dish          uuid.NullUUID        `json:"dish"`
	Date          sql.NullTime         `json:"date"`
	Status        NullOccurrenceStatus `json:"status"`
	Kj            sql.NullInt32        `json:"kj"`
	Kcal          sql.NullInt32        `json:"kcal"`
	Fat           sql.NullInt32        `json:"fat"`
	SaturatedFat  sql.NullInt32        `json:"saturated_fat"`
	Carbohydrates sql.NullInt32        `json:"carbohydrates"`
	Sugar         sql.NullInt32        `json:"sugar"`
	Fiber         sql.NullInt32        `json:"fiber"`
	Protein       sql.NullInt32        `json:"protein"`
	Salt          sql.NullInt32        `json:"salt"`
	PriceStudent  sql.NullInt32        `json:"price_student"`
	PriceStaff    sql.NullInt32        `json:"price_staff"`
	PriceGuest    sql.NullInt32        `json:"price_guest"`
}

type UpdateReviewParams

type UpdateReviewParams struct {
	ID          uuid.UUID      `json:"id"`
	Occurrence  uuid.NullUUID  `json:"occurrence"`
	DisplayName sql.NullString `json:"display_name"`
	Stars       sql.NullInt32  `json:"stars"`
	Text        sql.NullString `json:"text"`
	Approved    sql.NullBool   `json:"approved"`
}

type User

type User struct {
	ID           uuid.UUID `json:"id"`
	Email        string    `json:"email"`
	PasswordHash string    `json:"password_hash"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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