Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Courier ¶
type Courier struct {
gorm.Model
/*
Inside gorm.Model:
ID uint `gorm:"primaryKey"` incrementing
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
*/
Name string // Name of the courier
Phone string // Phone address of the courier
}
Courier DB table model
type Locker ¶
type Locker struct {
gorm.Model
/*
ID string `gorm:"primaryKey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
*/
City string //Name of the city where the locker is
Address string // Address of the locker
Latitude float64
Longitude float64
Capacity uint // Shows how many packages could be there
}
Locker DB table Model
type LockerGroup ¶
type LockerGroup struct {
ID uint // Identification of the locker group
City string // For human readability, which city is this group in
}
LockerGroup DB table Model
func (LockerGroup) TableName ¶
func (LockerGroup) TableName() string
Name of the LockerGroup structs in the DB
type Package ¶
type Package struct {
gorm.Model
/*
Inside gorm.Model:
ID uint `gorm:"primaryKey"` incrementing
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
*/
TrackID string // Code for package tracking
UserID uint // Sender user's id
SenderLockerId uint // Sender locker's id
DestinationLockerId uint // Destination locker's id
ReceiverName string // Name of the person who gets the package
ReceiverEmail string // Email of the person who gets the package
Size string // Could be small, medium or large
DeliverySpeed string // Type of delivery
Price float64 // Delivery fee (how to calculate?)
Code string // Code to open the locker (both sender and receiver) - random 6 digit number maybe?
DeliveryDate time.Time // Date when the package arrives
Co2 float64 // Amount of CO2 spared with this package
Note string // Extra note
CourierID uint // Courier's id who delivers the package (can be different from send. locker to warehouse and warehouse to dest. locker?)
}
Package DB table model
type PackageLocker ¶
type PackageLocker struct {
Package_id uint `gorm:"primaryKey"`
Locker_id uint `gorm:"primaryKey"`
}
PackageLocker DB table model
func (PackageLocker) TableName ¶
func (PackageLocker) TableName() string
Name of the PackageStatus structs in the DB
type PackageStatus ¶
type PackageStatus struct {
Package_id uint `gorm:"primaryKey"`
Status_id uint `gorm:"primaryKey"`
}
PackageStatus DB table model
func (PackageStatus) TableName ¶
func (PackageStatus) TableName() string
Name of the PackageStatus structs in the DB
type ResetPasswordCode ¶
type ResetPasswordCode struct {
gorm.Model
/*
Inside gorm.Model:
ID uint `gorm:"primaryKey"` incrementing
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
*/
Code string
User_id uint
}
ResetPasswordCode DB table model
func (ResetPasswordCode) TableName ¶
func (ResetPasswordCode) TableName() string
Name of the ResetPasswordCode structs in the DB
type User ¶
type User struct {
gorm.Model
/*
Inside gorm.Model:
ID uint `gorm:"primaryKey"` incrementing
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
*/
Name string
Address string
Phone string
Email string
Password string
AccessLevel uint
Packages []Package
}
User DB table model
Click to show internal directories.
Click to hide internal directories.