model

package
v0.0.0-...-6eb8140 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameBusinessowner = "businessowners"
View Source
const TableNameDriver = "drivers"
View Source
const TableNameDriverLocation = "driver_location"
View Source
const TableNameOrder = "orders"
View Source
const TableNameRoute = "routes"
View Source
const TableNameUser = "users"

Variables

This section is empty.

Functions

This section is empty.

Types

type Businessowner

type Businessowner struct {
	ID        string    `gorm:"column:id;primaryKey" json:"id"`
	Nik       string    `gorm:"column:nik" json:"nik"`
	Verified  bool      `gorm:"column:verified" json:"verified"`
	CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

Businessowner mapped from table <businessowners>

func (*Businessowner) TableName

func (*Businessowner) TableName() string

TableName Businessowner's table name

type Driver

type Driver struct {
	ID                 string    `gorm:"column:id;primaryKey;default:gen_random_uuid()" json:"id"`
	OwnerID            string    `gorm:"column:owner_id" json:"owner_id"`
	RouteID            string    `gorm:"column:route_id" json:"route_id"`
	RegistrationNumber string    `gorm:"column:registration_number" json:"registration_number"`
	Status             string    `gorm:"column:status;default:off" json:"status"`
	AvailableSeats     int32     `gorm:"column:available_seats;default:9" json:"available_seats"`
	CreatedAt          time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt          time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

Driver mapped from table <drivers>

func (*Driver) TableName

func (*Driver) TableName() string

TableName Driver's table name

type DriverLocation

type DriverLocation struct {
	DriverID  string    `gorm:"column:driver_id;primaryKey" json:"driver_id"`
	Location  string    `gorm:"column:location" json:"location"`
	CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
}

DriverLocation mapped from table <driver_location>

func (*DriverLocation) TableName

func (*DriverLocation) TableName() string

TableName DriverLocation's table name

type Order

type Order struct {
	ID              string    `gorm:"column:id;primaryKey;default:gen_random_uuid()" json:"id"`
	UserID          string    `gorm:"column:user_id" json:"user_id"`
	DriverID        string    `gorm:"column:driver_id" json:"driver_id"`
	PickupLocation  string    `gorm:"column:pickup_location" json:"pickup_location"`
	DropOffLocation string    `gorm:"column:drop_off_location" json:"drop_off_location"`
	Status          string    `gorm:"column:status" json:"status"`
	CreatedAt       time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt       time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

Order mapped from table <orders>

func (*Order) TableName

func (*Order) TableName() string

TableName Order's table name

type Route

type Route struct {
	ID               string    `gorm:"column:id;primaryKey;default:gen_random_uuid()" json:"id"`
	RouteName        string    `gorm:"column:route_name" json:"route_name"`
	InitialRoute     string    `gorm:"column:initial_route" json:"initial_route"`
	DestinationRoute string    `gorm:"column:destination_route" json:"destination_route"`
	CreatedAt        time.Time `gorm:"column:created_at" json:"created_at"`
}

Route mapped from table <routes>

func (*Route) TableName

func (*Route) TableName() string

TableName Route's table name

type User

type User struct {
	ID          string    `gorm:"column:id;primaryKey" json:"id"`
	FirstName   string    `gorm:"column:first_name;not null" json:"first_name"`
	LastName    string    `gorm:"column:last_name" json:"last_name"`
	Email       string    `gorm:"column:email;not null" json:"email"`
	PhoneNumber string    `gorm:"column:phone_number;not null" json:"phone_number"`
	Password    string    `gorm:"column:password;not null" json:"password"`
	DateOfBirth time.Time `gorm:"column:date_of_birth" json:"date_of_birth"`
	Age         int32     `gorm:"column:age" json:"age"`
	Gender      string    `gorm:"column:gender" json:"gender"`
	Role        string    `gorm:"column:role;not null" json:"role"`
	IsBlocked   bool      `gorm:"column:is_blocked" json:"is_blocked"`
	CreatedAt   time.Time `gorm:"column:created_at;default:now()" json:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at;default:now()" json:"updated_at"`
}

User mapped from table <users>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

Jump to

Keyboard shortcuts

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