model

package
v0.0.0-...-35ce3d9 Latest Latest
Warning

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

Go to latest
Published: May 20, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialog

type Dialog struct {
	ID        string `db:"id"`
	TitleID   string `db:"title_id"`
	Start     int    `db:"start"`
	End       int    `db:"end"`
	Text      string `db:"text"`
	CreatedAt int    `db:"created_at"`
	UpdatedAt int    `db:"updated_at"`

	Title        *Title
	Translations []*Translation
}

func (*Dialog) GenerateID

func (c *Dialog) GenerateID()

type DialogIndex

type DialogIndex struct {
	ID       string `json:"-"`
	TitleID  string `json:"title_id,omitempty"`
	Start    int    `json:"start,omitempty"`
	Text     string `json:"text,omitempty"`
	TextDe   string `json:"text_de,omitempty"`
	TextEs   string `json:"text_es,omitempty"`
	TextFr   string `json:"text_fr,omitempty"`
	TextIt   string `json:"text_it,omitempty"`
	TextPtbr string `json:"text_ptbr,omitempty"`
}

func (*DialogIndex) GetTextValue

func (c *DialogIndex) GetTextValue(languageID string) string

func (*DialogIndex) SetTextValue

func (c *DialogIndex) SetTextValue(languageID string, text string)

type Language

type Language struct {
	ID          string `db:"id"`
	Name        string `db:"name"`
	CountryCode string `db:"country_code"`
	Enabled     bool   `db:"enabled"`
}

func FindLanguage

func FindLanguage(languageID string, languages []*Language) *Language

type Title

type Title struct {
	ID           string `db:"id"`
	Name         string `db:"name"`
	Kind         string `db:"kind"`
	Year         int    `db:"year"`
	LanguageID   string `db:"language_id"`
	Translations string `db:"translations"`
}

func (*Title) GenerateID

func (c *Title) GenerateID()

type Token

type Token struct {
	ID     string `db:"id"`
	UserID string `db:"user_id"`
}

func NewToken

func NewToken(userID string) *Token

func (*Token) GenerateID

func (c *Token) GenerateID()

type Translation

type Translation struct {
	ID         string `db:"id"`
	DialogID   string `db:"dialog_id"`
	LanguageID string `db:"language_id"`
	Text       string `db:"text"`
	CreatedAt  int    `db:"created_at"`
	UpdatedAt  int    `db:"updated_at"`

	Dialog *Dialog
}

func (*Translation) GenerateID

func (c *Translation) GenerateID()

type User

type User struct {
	ID                    string  `db:"id"`
	Name                  string  `db:"name"`
	Email                 string  `db:"email"`
	Gender                string  `db:"gender"`
	TranslationLanguageID *string `db:"translation_language_id"`
}

func (*User) GenerateID

func (c *User) GenerateID()

func (*User) SetTranslationLanguageID

func (c *User) SetTranslationLanguageID(value string)

type UserConnection

type UserConnection struct {
	UserID         string `db:"user_id"`
	ProviderID     string `db:"provider_id"`
	ProviderUserID string `db:"provider_user_id"`

	User *User
}

Jump to

Keyboard shortcuts

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