order

package
v0.0.0-...-bc6e940 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package order contains the business logic for the order entity

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	ID        int64     `json:"id" example:"123"`
	DinnerID  int64     `json:"diner_id" example:"1"`
	MenuID    int64     `json:"menu_id" example:"3"`
	Quantity  int       `json:"quantity" example:"2"`
	CreatedAt time.Time `json:"created_at,omitempty" `
}

Request is a struct that contains the request order information

type Response

type Response struct {
	ID              int64     `json:"id" example:"123"`
	DinnerName      string    `json:"diner_name" example:"Mr. Smith"`
	MenuName        string    `json:"menu_name" example:"HCDB"`
	MenuDescription string    `json:"menu_description" example:"Hyderabadi Chicken Dum Briyani"`
	Quantity        int       `json:"quantity" example:"2"`
	CreatedAt       time.Time `json:"created_at,omitempty" `
	UpdatedAt       time.Time `json:"updated_at,omitempty" example:"2021-02-24 20:19:39"`
}

Response is a struct that contains the response order information

type Service

type Service interface {
	Get(int) ([]*Response, error)
	Create(*Request) error
	Delete(int) error
}

Service is a interface that contains the methods for the order service

Jump to

Keyboard shortcuts

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