changes to model
This commit is contained in:
@@ -2,15 +2,16 @@ package model
|
||||
|
||||
type Company struct {
|
||||
ID int
|
||||
Name string
|
||||
Symbol string
|
||||
SharesOutstanding int
|
||||
Price float64
|
||||
CurrencyID int
|
||||
}
|
||||
|
||||
type CompanyInput struct {
|
||||
Name string `json:"name"`
|
||||
Symbol string `json:"symbol"`
|
||||
SharesOutstanding int `json:"shares_outstanding"`
|
||||
Price float64 `json:"price"`
|
||||
CurrencyID int `json:"currency_id"`
|
||||
CurrencyCode string `json:"currency_code"`
|
||||
}
|
||||
|
||||
@@ -6,11 +6,13 @@ import (
|
||||
)
|
||||
|
||||
type Position struct {
|
||||
Company Company
|
||||
Currency Currency
|
||||
Weight float64
|
||||
CostBasis float64
|
||||
Shares int
|
||||
CompanyID int
|
||||
Symbol string
|
||||
CurrencyCode string
|
||||
CurrencyID int
|
||||
Weight float64
|
||||
CostBasis float64
|
||||
Shares int
|
||||
}
|
||||
|
||||
type TradeProduct int
|
||||
@@ -31,13 +33,15 @@ const (
|
||||
)
|
||||
|
||||
type Trade struct {
|
||||
Ticker Company
|
||||
Shares int
|
||||
Product TradeProduct
|
||||
Type TradeType
|
||||
Price float64
|
||||
Currency string
|
||||
Date time.Time
|
||||
CompanyID int
|
||||
Symbol string
|
||||
CurrencyID int
|
||||
CurrencyCode string
|
||||
Shares int
|
||||
Product TradeProduct
|
||||
Type TradeType
|
||||
Price float64
|
||||
Date time.Time
|
||||
}
|
||||
|
||||
type AddTradeRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user