26 lines
1.1 KiB
Go
26 lines
1.1 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
type LivreurPosition struct {
|
|
Latitude float64 `json:"latitude"`
|
|
Longitude float64 `json:"longitude"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
Status string `json:"status"` // "idle", "en_route", "arrived"
|
|
}
|
|
|
|
type DeliveryIssue struct {
|
|
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
|
|
CommandID int `json:"command_id" gorm:"column:command_id;index"`
|
|
IssueType string `json:"issue_type" gorm:"column:issue_type"`
|
|
Description string `json:"description" gorm:"column:description"`
|
|
Status string `json:"status" gorm:"column:status"`
|
|
ReportedBy string `json:"reported_by" gorm:"column:reported_by"`
|
|
ResolvedBy string `json:"resolved_by,omitempty" gorm:"column:resolved_by"`
|
|
Resolution string `json:"resolution,omitempty" gorm:"column:resolution"`
|
|
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
|
|
}
|
|
|
|
func (DeliveryIssue) TableName() string { return "delivery_issues" }
|