2019-02-26 17:06:21 +00:00
|
|
|
package models
|
|
|
|
|
|
2019-02-27 16:35:03 +00:00
|
|
|
import "time"
|
|
|
|
|
|
2019-02-26 17:06:21 +00:00
|
|
|
type (
|
2019-02-27 16:35:03 +00:00
|
|
|
// TODO: Embed BaseModel into all the other components. The problem is the map -> struct
|
|
|
|
|
// in utils.ConvertMapToStruct fxn
|
|
|
|
|
|
|
|
|
|
BaseModel struct {
|
|
|
|
|
ID int64 `json:"id,omitempty" sql:"id"`
|
|
|
|
|
CreatedAt time.Time `json:"created_at,omitempty" sql:"created_at"`
|
|
|
|
|
UpdatedAt time.Time `json:"updated_at,omitempty" sql:"updated_at"`
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-26 17:06:21 +00:00
|
|
|
Component struct {
|
2019-02-27 16:35:03 +00:00
|
|
|
ID int64 `json:"id,omitempty" sql:"id"`
|
|
|
|
|
CreatedAt time.Time `json:"created_at,omitempty" sql:"created_at"`
|
|
|
|
|
UpdatedAt time.Time `json:"updated_at,omitempty" sql:"updated_at"`
|
|
|
|
|
|
|
|
|
|
Name string `json:"name,omitempty" sql:"name"`
|
|
|
|
|
ComponentType string `json:"component_type,omitempty" sql:"component_type"`
|
|
|
|
|
Plan string `json:"plan,omitempty" sql:"plan"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Account struct {
|
|
|
|
|
ID int64 `json:"id,omitempty" sql:"id"`
|
|
|
|
|
CreatedAt time.Time `json:"created_at,omitempty" sql:"created_at"`
|
|
|
|
|
UpdatedAt time.Time `json:"updated_at,omitempty" sql:"updated_at"`
|
|
|
|
|
|
|
|
|
|
Name string `json:"name" sql:"name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Page struct {
|
|
|
|
|
ID int64 `json:"id,omitempty" sql:"id"`
|
|
|
|
|
CreatedAt time.Time `json:"created_at,omitempty" sql:"created_at"`
|
|
|
|
|
UpdatedAt time.Time `json:"updated_at,omitempty" sql:"updated_at"`
|
2019-02-26 17:06:21 +00:00
|
|
|
}
|
|
|
|
|
)
|