feat: ajout manual_status et status_history aux réservations
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 18m16s

This commit is contained in:
Arnaud Delcasse
2026-02-26 17:54:02 +01:00
parent 8f805162e2
commit d6ce717c75
5 changed files with 217 additions and 27 deletions

View File

@@ -8,6 +8,17 @@ const (
StatusForthcoming = 1
)
type StatusHistoryEntry struct {
FromStatus string `json:"from_status" bson:"from_status"`
ToStatus string `json:"to_status" bson:"to_status"`
UserID string `json:"user_id" bson:"user_id"`
UserName string `json:"user_name" bson:"user_name"`
GroupID string `json:"group_id" bson:"group_id"`
GroupName string `json:"group_name" bson:"group_name"`
Date time.Time `json:"date" bson:"date"`
Comment string `json:"comment" bson:"comment"`
}
type Booking struct {
ID string `json:"id" bson:"_id"`
Vehicleid string `json:"vehicleid"`
@@ -20,6 +31,9 @@ type Booking struct {
Deleted bool `json:"deleted"`
Vehicle Vehicle `json:"vehicle" bson:"-"`
ManualStatus string `json:"manual_status" bson:"manual_status"`
StatusHistory []StatusHistoryEntry `json:"status_history" bson:"status_history"`
}
func (b Booking) Status() int {