This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user