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>
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>
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>
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>
Click to show internal directories.
Click to hide internal directories.