domain

package
v0.0.0-...-303f178 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 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           int64
	UUID         uuid.UUID
	BookingDates []*BookingDate
	Vehicle      *Vehicle
	Customer     *Customer
}

type BookingDate

type BookingDate struct {
	ID   int64
	Time time.Time
}

type Customer

type Customer struct {
	ID       int64
	UUID     uuid.UUID
	Username string
}

type FuelType

type FuelType string
const (
	Petrol FuelType = "PETROL"
	Diesel FuelType = "DIESEL"
)

type Vehicle

type Vehicle struct {
	ID                 int64            `json:"id"`
	UUID               uuid.UUID        `json:"uuid"`
	RegistrationNumber string           `json:"registartion_number"`
	Make               string           `json:"make"`
	Model              string           `json:"model"`
	FuelType           FuelType         `json:"fuel_type"`
	VehicleCategory    *VehicleCategory `json:"vehicle_category"`
	Bookings           []*Booking       `json:"-"`
}

type VehicleCategory

type VehicleCategory struct {
	ID          int64       `json:"id"`
	VehicleType VehicleType `json:"vehicle_type"`
	PricePerDay float32     `json:"price_per_day"`
}

type VehicleType

type VehicleType string
const (
	SmallCar  VehicleType = "SMALL_CAR"
	EstateCar VehicleType = "ESTATE_CAR"
	Van       VehicleType = "VAN"
)

Jump to

Keyboard shortcuts

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