models

package
v0.0.0-...-66cb340 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Id        int64     `json:"id"`
	GuestName string    `json:"guestName"`
	Content   string    `orm:"type(text)" json:"content"`
	Reply     string    `json:"reply"`
	PostId    int64     `json:"postId"`
	PostTitle string    `json:"postTitle"`
	CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
}

func (*Message) Delete

func (this *Message) Delete() error

func (*Message) Insert

func (this *Message) Insert() error

func (*Message) Query

func (this *Message) Query() orm.QuerySeter

func (*Message) Read

func (this *Message) Read() error

func (*Message) Update

func (this *Message) Update()

type Post

type Post struct {
	Id        int64     `json:"id"`
	Title     string    `json:"title"`
	Content   string    `orm:"type(text)" json:"content"`
	Thumb     string    `json:"thumb"`
	Tag       string    `json:"tag"`
	PublishAt time.Time `orm:"auto_now_add;type(datetime)" json:"publishAt"`
}

func (*Post) Delete

func (this *Post) Delete() error

func (*Post) Insert

func (this *Post) Insert() error

func (*Post) Query

func (this *Post) Query() orm.QuerySeter

func (*Post) Read

func (this *Post) Read() error

func (*Post) Update

func (this *Post) Update()

type User

type User struct {
	Id        int64  `json:"id"`
	UserName  string `orm:"size(50)" json:"userName"`
	SiteTitle string `orm:"size(50)" json:"siteTitle"`
	Password  string `orm:"size(100)" json:"-"`
	Thumb     string `orm:"size(500)" json:"thumb"`
	HeadBgPic string `json:"headBgPic"`
	AboutMe   string `orm:"size(2000)" json:"aboutMe"`
}

func (*User) Query

func (this *User) Query() orm.QuerySeter

func (*User) Update

func (this *User) Update()

Jump to

Keyboard shortcuts

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