model

package
v0.0.0-...-d12dea3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const SCHEMA = `` /* 1044-byte string literal not displayed */

Variables

This section is empty.

Functions

func Initialize

func Initialize(db *gorm.DB)

Types

type Customer

type Customer struct {
	ID              string       `gorm:"primary_key" json:"id"`
	CreatedAt       time.Time    `json:"createdAt"`
	UpdatedAt       time.Time    `json:"updatedAt"`
	Name            string       `json:"name"`
	Email           string       `json:"email"`
	Role            CustomerRole `json:"role"`
	RoleId          string       `json:"roleId"`
	WantsNewsletter bool         `json:"wantsNewsletter"`
	InNewsletter    bool         `json:"inNewsletter"`
}

type CustomerRole

type CustomerRole struct {
	ID string `gorm:"primary_key" json:"id"`
}

type WineComment

type WineComment struct {
	ID         string    `gorm:"primary_key" json:"id"`
	CreatedAt  time.Time `json:"createdAt"`
	UpdatedAt  time.Time `json:"updatedAt"`
	Customer   Customer  `json:"customer"`
	CustomerId string    `json:"customerId"`
	WineId     string    `json:"wineId"`
	WineYear   int       `json:"wineYear"`
	Comment    string    `json:"comment"`
}

Jump to

Keyboard shortcuts

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