model

package
v0.0.0-...-d047bce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Models = []interface{}{
	&Company{},
	&Price{},
}

Functions

This section is empty.

Types

type Company

type Company struct {
	ID        string    `gorm:"primarykey"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`

	Symbol      string `json:"symbol" gorm:"unique"`
	Name        string `json:"companyName" gorm:"unique"`
	Exchange    string `json:"exchange"`
	Industry    string `json:"industry"`
	Website     string `json:"website"`
	Description string `json:"description"`
	CEO         string `json:"CEO"`
	IssueType   string `json:"issueType"`
	Sector      string `json:"sector"`
	Employees   int    `json:"employees"`
	//Tags           []string `json:"tags"`
	SecurityName   string `json:"securityName"`
	PrimarySICCode int    `json:"primarySicCode"`
	Address        string `json:"address"`
	Address2       string `json:"address2"`
	State          string `json:"state"`
	City           string `json:"city"`
	Zip            string `json:"zip"`
	Country        string `json:"country"`
	Phone          string `json:"phone"`
}

func (*Company) BeforeCreate

func (c *Company) BeforeCreate(tx *gorm.DB) error

type Price

type Price struct {
	ID        string    `gorm:"primarykey"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`

	Symbol string    `json:"symbol"`
	Time   time.Time `json:"time"`
	Value  float64   `json:"value"`
}

func (*Price) BeforeCreate

func (p *Price) BeforeCreate(tx *gorm.DB) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL