company

package
v0.0.0-...-395d67b Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	DB *gorm.DB
}

API holds all related api(s) handler

func NewAPI

func NewAPI(d *gorm.DB) *API

NewAPI creates a new api and insert the database provided in it

func (*API) PostCompany

func (a *API) PostCompany(c echo.Context) error

PostCompany handles post request to create new company

type Company

type Company struct {
	gorm.Model
	Name         string  `gorm:"name" json:"name,omitempty"`
	Responsible  string  `gorm:"responsible" json:"responsible,omitempty"`
	Type         string  `gorm:"type" json:"type,omitempty"`
	IndustryID   uint    `gorm:"industry_id" json:"industry_id,omitempty"`
	Employees    string  `gorm:"employees" json:"employees,omitempty"`
	AnnualIncome float64 `gorm:"annual_income" json:"annual_income,omitempty"`
	Currency     string  `gorm:"currency" json:"currency,omitempty"`
	Comment      string  `gorm:"comment" json:"comment,omitempty"`
}

Company holds information for company

func NewCompany

func NewCompany() *Company

NewCompany creates a new model

Jump to

Keyboard shortcuts

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