models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_DRIVER = "db_driver"
	DB_CONN   = "db_connection"
	DB_IDLE   = "db_idle"
	DB_MAX    = "db_max"
)
View Source
const (
	COMPONENT = "component"
)
View Source
const (
	CONTREP = "contrep"
)
View Source
const (
	DOCUMENT = "document"
)

Variables

View Source
var (
	Orm orm.Ormer
)

Functions

func InitDB

func InitDB(init bool, prefill bool)

func NewQueryBuilder

func NewQueryBuilder() (orm.QueryBuilder, error)

Types

type Component

type Component struct {
	Id       int       `orm:"pk;auto"`
	Created  time.Time `orm:"auto_now_add;type(datetime)"`
	Updated  time.Time `orm:"auto_now;type(datetime)"`
	Name     string    `orm:"size(100)"`
	Document *Document `orm:"rel(fk)"`
}

func (*Component) TableName

func (this *Component) TableName() string

type Contrep

type Contrep struct {
	Id                   int       `orm:"pk;auto"`
	Created              time.Time `orm:"auto_now_add;type(datetime)"`
	Updated              time.Time `orm:"auto_now;type(datetime)"`
	Name                 string    `orm:"size(100)"`
	Desc                 string    `orm:"null;size(1000)"`
	IsOnline             bool      `orm:"size(1000)"`
	Cert                 string    `orm:"null;size(2000)"`
	CertDatetime         time.Time `orm:"null"`
	IsCertProtected      bool
	IsCertChecked        bool
	ReceivedCert         string    `orm:"null;size(2000)"`
	ReceivedCertDatetime time.Time `orm:"null"`
	DocProtection        string    `orm:"null;size(4)"`
}

func (*Contrep) TableName

func (this *Contrep) TableName() string

type Document

type Document struct {
	Id      int       `orm:"pk;auto"`
	Created time.Time `orm:"auto_now_add;type(datetime)"`
	Updated time.Time `orm:"auto_now;type(datetime)"`
	Name    string    `orm:"size(100)"`
}

func (*Document) TableName

func (this *Document) TableName() string

Jump to

Keyboard shortcuts

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