model

package
v0.0.0-...-a003fe3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2014 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Autogenerated by gomgen

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(db *sql.DB) error

register db object for the models

Types

type Article

type Article struct {
	Id         int64
	Active     bool
	Title      string
	Content    string
	CreateDate time.Time
	UpdateDate time.Time
	CategoryId int64
}

table article

func FindArticle

func FindArticle(query interface{}, params ...interface{}) (*Article, error)

find Article

func FindArticles

func FindArticles(params ...interface{}) ([]*Article, error)

find all Articles

func (*Article) FindCategory

func (this *Article) FindCategory() (*Category, error)

find related Category

func (*Article) Save

func (this *Article) Save() error

Save Article

type Category

type Category struct {
	Id   int64
	Name string
}

table category

func FindCategories

func FindCategories(params ...interface{}) ([]*Category, error)

find all Categories

func FindCategory

func FindCategory(query interface{}, params ...interface{}) (*Category, error)

find Category

func (*Category) Save

func (this *Category) Save() error

Save Category

Jump to

Keyboard shortcuts

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