Update mit Trading-Modul
release-tag / release-image (push) Successful in 2m6s

This commit is contained in:
2026-05-30 12:05:35 +02:00
parent d884331c61
commit 9b02905000
7 changed files with 746 additions and 22 deletions
+74 -1
View File
@@ -1,6 +1,9 @@
package main
import "time"
import (
"database/sql"
"time"
)
const (
StatusOpen = "open"
@@ -75,3 +78,73 @@ type StorageLocation struct {
CreatedAt time.Time
UpdatedAt time.Time
}
const (
TradingPurposeTrade = "trade"
TradingPurposeHauling = "hauling"
TradingPurposeEvent = "event"
TradingPurposeIntern = "intern"
)
type TradingRun struct {
ID int64
UserID string
UserName string
Purpose string
Ship string
BuyValue int64
SellValue int64
Costs int64
Repetitions int64
SCU float64
Distance float64
SCUGrade string
Commodity string
PostA string
PostB string
Note string
Month int
Year int
OrgPercent float64
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt sql.NullTime
DeletedByID string
}
type TradingListFilter struct {
Month int
Year int
UserID string
Limit int
}
type TradingSummary struct {
Month int
Year int
Count int
GrossProfit int64
OrgShare int64
TotalSCU float64
TotalCosts int64
TotalDistance float64
TopTraders []TradingTraderSummary
PurposeSummary []TradingPurposeSummary
}
type TradingTraderSummary struct {
UserID string
UserName string
Profit int64
OrgShare int64
SCU float64
Runs int
}
type TradingPurposeSummary struct {
Purpose string
Profit int64
OrgShare int64
SCU float64
Runs int
}