models

package
v0.0.0-...-8df60ae Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB() (*gorm.DB, error)

InitDB creates and migrates the database

Types

type Company

type Company struct {
	Id             uint64 `sql:"type:bigint PRIMARY KEY`
	Name           string `gorm:"type:varchar(100);not null"`
	Email          string `gorm:"type:varchar(100);not null"`
	Password       string `gorm:"type:varchar(100);not null"`
	Telephone      string `gorm:"type:varchar(15);not null"`
	Code           string `gorm:"type:varchar(15);not null"`
	Is_active      int
	Is_verified    int
	Last_login     *time.Time
	Remember_login string `gorm:"type:varchar(100);null"`
	CreatedAt      time.Time
	UpdatedAt      time.Time
	DeletedAt      *time.Time
}

func FindCompanyByEmail

func FindCompanyByEmail(db *gorm.DB, email string) (*Company, error)

type CompanyEmail

type CompanyEmail string

type CompanyResults

type CompanyResults struct {
	Id          uint64
	Name        string
	Email       string
	Telephone   string
	Code        string
	Is_active   int
	Is_verified int
}

type EmailNotExistsError

type EmailNotExistsError struct{}

func (*EmailNotExistsError) Error

func (*EmailNotExistsError) Error() string

Jump to

Keyboard shortcuts

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