some tests and initial json structure
This commit is contained in:
78
pkg/ecalc/ecalc.go
Normal file
78
pkg/ecalc/ecalc.go
Normal file
@@ -0,0 +1,78 @@
|
||||
package ecalc
|
||||
|
||||
type Ecalc struct {
|
||||
ID int `json:"id,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Version string `json:"version,omitempty"`
|
||||
CompanyFacts CompanyFacts `json:"companyFacts,omitempty"`
|
||||
}
|
||||
|
||||
type CompanyFacts struct {
|
||||
ID int `json:"id"`
|
||||
TotalPurchaseFromSuppliers int `json:"totalPurchaseFromSuppliers"`
|
||||
TotalStaffCosts int `json:"totalStaffCosts"`
|
||||
Profit int `json:"profit"`
|
||||
FinancialCosts int `json:"financialCosts"`
|
||||
IncomeFromFinancialInvestments int `json:"incomeFromFinancialInvestments"`
|
||||
AdditionsToFixedAssets int `json:"additionsToFixedAssets"`
|
||||
Turnover int `json:"turnover"`
|
||||
TotalAssets int `json:"totalAssets"`
|
||||
FinancialAssetsAndCashBalance int `json:"financialAssetsAndCashBalance"`
|
||||
SupplyFractions []SupplyFraction `json:"supplyFractions"`
|
||||
EmployeesFractions []EmployeesFraction `json:"employeesFractions"`
|
||||
IndustrySectors []IndustrySector `json:"industrySectors"`
|
||||
NumberOfEmployees int `json:"numberOfEmployees"`
|
||||
HasCanteen bool `json:"hasCanteen"`
|
||||
IsB2B bool `json:"isB2B"`
|
||||
AverageJourneyToWorkForStaffInKm float32 `json:"averageJourneyToWorkForStaffInKm"`
|
||||
Rating Rating `json:"rating"`
|
||||
}
|
||||
|
||||
type SupplyFraction struct {
|
||||
ID int `json:"id"`
|
||||
IndustryCode string `json:"industryCode"`
|
||||
CountryCode string `json:"countryCode"`
|
||||
Costs int `json:"costs"`
|
||||
}
|
||||
|
||||
type EmployeesFraction struct {
|
||||
ID int `json:"id"`
|
||||
CountryCode string `json:"countryCode"`
|
||||
Percentage float32 `json:"percentage"`
|
||||
}
|
||||
|
||||
type IndustrySector struct {
|
||||
ID int `json:"id"`
|
||||
IndustryCode string `json:"industryCode"`
|
||||
AmountOfTotalTurnover int `json:"amountOfTotalTurnover"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type Rating struct {
|
||||
Topics []Topic `json:"topics,omitempty"`
|
||||
}
|
||||
|
||||
type Topic struct {
|
||||
Points int `json:"points,omitempty"`
|
||||
MaxPoints float32 `json:"maxPoints,omitempty"`
|
||||
ID int `json:"id,omitempty"`
|
||||
ShortName string `json:"shortName,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Estimations int `json:"estimations,omitempty"`
|
||||
Weight float32 `json:"weight,omitempty"`
|
||||
IsWeightSelectedByUser bool `json:"isWeightSelectedByUser,omitempty"`
|
||||
Aspects []Aspect `json:"aspects,omitempty"`
|
||||
}
|
||||
|
||||
type Aspect struct {
|
||||
Points int `json:"points,omitempty"`
|
||||
MaxPoints float32 `json:"maxPoints,omitempty"`
|
||||
ID int `json:"id,omitempty"`
|
||||
ShortName string `json:"shortName,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Estimations int `json:"estimations,omitempty"`
|
||||
Weight float32 `json:"weight,omitempty"`
|
||||
IsWeightSelectedByUser bool `json:"isWeightSelectedByUser,omitempty"`
|
||||
Aspects []Aspect `json:"aspects,omitempty"`
|
||||
IsPositive bool `json:"isPositive,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user