basic internal structure
This commit is contained in:
28
internal/model/company.go
Normal file
28
internal/model/company.go
Normal file
@@ -0,0 +1,28 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user