models

package
v0.0.0-...-ee126ca Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Booking

type Booking struct {
	ID         string      `json:"id"`
	UserID     string      `json:"userId"`
	FlightID   string      `json:"flightId"`
	Price      int         `json:"price"`
	Status     string      `json:"status"`
	Passengers []Passenger `json:"passengers"`
}

func (*Booking) Collection

func (b *Booking) Collection() string

func (*Booking) Key

func (b *Booking) Key() string

type Flight

type Flight struct {
	ID        string    `json:"id"`
	From      string    `json:"from"`
	To        string    `json:"to"`
	Departure time.Time `json:"departure"`
	Arrival   time.Time `json:"arrival"`
	Status    string    `json:"status"`
}

func (*Flight) Collection

func (f *Flight) Collection() string

func (*Flight) Key

func (f *Flight) Key() string

type Passenger

type Passenger struct {
	Name string `json:"name"`
	Seat string `json:"seat"`
}

type Seat

type Seat struct {
	FlightID  string `json:"flightId"`
	Seat      string `json:"seat"`
	Row       int    `json:"row"`
	Price     int    `json:"price"`
	Available bool   `json:"available"`
}

func (*Seat) Collection

func (s *Seat) Collection() string

func (*Seat) Key

func (s *Seat) Key() string

Jump to

Keyboard shortcuts

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