1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-12-21 00:21:15 +00:00
sii/block_profit_log_entry.go
Knut Ahlers 2f64ab29dc
Fix: Profit logs contain pointer, not strings
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-12-11 19:23:17 +01:00

31 lines
912 B
Go

package sii
func init() {
RegisterBlock(&ProfitLogEntry{})
}
type ProfitLogEntry struct {
Revenue int64 `sii:"revenue"`
Wage int64 `sii:"wage"`
Maintenance int64 `sii:"maintenance"`
Fuel int64 `sii:"fuel"`
Distance int64 `sii:"distance"`
DistanceOnJob bool `sii:"distance_on_job"`
CargoCount int64 `sii:"cargo_count"`
Cargo Ptr `sii:"cargo"`
SourceCity Ptr `sii:"source_city"`
SourceCompany Ptr `sii:"source_company"`
DestinationCity Ptr `sii:"destination_city"`
DestinationCompany Ptr `sii:"destination_company"`
TimestampDay int64 `sii:"timestamp_day"`
blockName string
}
func (ProfitLogEntry) Class() string { return "profit_log_entry" }
func (p *ProfitLogEntry) Init(class, name string) {
p.blockName = name
}
func (p ProfitLogEntry) Name() string { return p.blockName }