models

package
v0.0.0-...-712c0c1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	gorm.Model
	l10n.Locale
	//publish.Status
	sorting.Sorting `json:"sort_id"`
	Name            string    `json:"name"`
	NameWithSlug    slug.Slug `l10n:"sync" json:"slug"`
	Parent          uint      `l10n:"sync" json:"parent_id"`
}

func (Category) Validate

func (category Category) Validate(db *gorm.DB)

type User

type User struct {
	gorm.Model
	Email    string
	Password string
	Name     string
	Gender   string
	Role     string

	// Confirm
	ConfirmToken string
	Confirmed    bool

	// Recover
	RecoverToken       string
	RecoverTokenExpiry *time.Time
}

func (User) AvailableLocales

func (user User) AvailableLocales() []string

func (User) DisplayName

func (user User) DisplayName() string

Jump to

Keyboard shortcuts

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