29 lines
575 B
Go
29 lines
575 B
Go
package model
|
|
|
|
type Currency struct {
|
|
ID int
|
|
Code string
|
|
Name string
|
|
}
|
|
|
|
type Company struct {
|
|
ID int
|
|
Name string
|
|
SharesOutstanding int
|
|
Price float64
|
|
CurrencyID int
|
|
Currency *Currency // populated on joins
|
|
}
|
|
|
|
type CompanyInput struct {
|
|
Name string `json:"name"`
|
|
SharesOutstanding int `json:"shares_outstanding"`
|
|
Price float64 `json:"price"`
|
|
CurrencyID int `json:"currency_id"`
|
|
}
|
|
|
|
type CurrencyInput struct {
|
|
Code string `json:"code"`
|
|
Name string `json:"name"`
|
|
}
|