All checks were successful
release-tag / release-image (push) Successful in 2m8s
173 lines
3.5 KiB
Go
173 lines
3.5 KiB
Go
package main
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
StatusOpen = "open"
|
|
StatusAccepted = "accepted"
|
|
StatusInDelivery = "in_delivery"
|
|
StatusDelivered = "delivered"
|
|
StatusCompleted = "completed"
|
|
StatusDeclined = "declined"
|
|
StatusCancelled = "cancelled"
|
|
)
|
|
|
|
const (
|
|
EventOrderCreated = "order_created"
|
|
EventOrderAccepted = "order_accepted"
|
|
EventOrderDeclined = "order_declined"
|
|
EventOrderStatus = "order_status_changed"
|
|
EventMessageForwarded = "message_forwarded"
|
|
EventInventoryChanged = "inventory_changed"
|
|
)
|
|
|
|
type Order struct {
|
|
ID int64
|
|
SubmitterID string
|
|
SubmitterName string
|
|
AcceptorID string
|
|
AcceptorName string
|
|
Commodity string
|
|
Quality int
|
|
QuantityAmount float64
|
|
QuantityUnit string
|
|
Deadline string
|
|
DeliveryPlace string
|
|
MaxBudgetAUEC int64
|
|
Status string
|
|
PublicChannelID string
|
|
PublicMessageID string
|
|
InternalChannelID string
|
|
InternalMessageID string
|
|
ThreadID string
|
|
LastFeedback string
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type InventoryItem struct {
|
|
ID int64
|
|
Name string
|
|
NormalizedName string
|
|
Quality int
|
|
QuantityAmount float64
|
|
QuantityUnit string
|
|
Location string
|
|
Note string
|
|
UpdatedByID string
|
|
UpdatedByName string
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type InventoryMatch struct {
|
|
Item InventoryItem
|
|
RequestedQuantity float64
|
|
Available bool
|
|
}
|
|
|
|
type StorageLocation struct {
|
|
ID int64
|
|
Name string
|
|
NormalizedName string
|
|
CreatedByID string
|
|
CreatedByName string
|
|
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
|
|
}
|
|
|
|
type RichPresenceConfig struct {
|
|
Enabled bool
|
|
Status string
|
|
ActivityType string
|
|
Name string
|
|
State string
|
|
Details string
|
|
StartTimestamp int64
|
|
EndTimestamp int64
|
|
LargeImage string
|
|
LargeText string
|
|
SmallImage string
|
|
SmallText string
|
|
InviteChannelID string
|
|
InvitePostChannelID string
|
|
InviteButtonLabel string
|
|
InvitePostTitle string
|
|
InvitePostText string
|
|
LastInviteMessageID string
|
|
LastInviteChannelID string
|
|
}
|