model

package
v0.0.0-...-8b404d4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	POST_STATUS_EXAMING int64 = 0 // 审核中
	POST_STATUS_PASS    int64 = 1 // 审核通过
	POST_STATUS_REJECT  int64 = 2 // 审核拒绝
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Menu struct {
	MenuId       int64     `gorm:"column:menu_id" json:"menu_id" form:"menu_id"`
	MenuType     string    `gorm:"column:menu_type" json:"menu_type" form:"menu_type"`
	MenuName     string    `gorm:"column:menu_name" json:"menu_name" form:"menu_name"`
	MenuParentId int64     `gorm:"column:menu_parent_id" json:"menu_parent_id" form:"menu_parent_id"`
	MenuRoute    string    `gorm:"column:menu_route" json:"menu_route" form:"menu_route"`
	MenuOrder    int64     `gorm:"column:menu_order" json:"menu_order" form:"menu_order"`
	MenuData     string    `gorm:"column:menu_data" json:"menu_data" form:"menu_data"`
	MenuCreateAt time.Time `gorm:"column:menu_create_at" json:"menu_create_at" form:"menu_create_at"`
	MenuUpdteAt  time.Time `gorm:"column:menu_updte_at" json:"menu_updte_at" form:"menu_updte_at"`
}

type Post

type Post struct {
	model.BaseModel
	PostId             int64     `gorm:"primary_key;column:post_id" json:"post_id" form:"post_id"`
	PostTitle          string    `gorm:"column:post_title" json:"post_title" form:"post_title"`
	PostKey            string    `gorm:"column:post_key" json:"post_key" form:"post_key"`
	PostContent        string    `gorm:"column:post_content" json:"post_content" form:"post_content"`
	PostStatus         int64     `gorm:"column:post_status" json:"post_status" form:"post_status"`
	PostStatusDes      string    `gorm:"column:post_status_des" json:"post_status_des" form:"post_status_des"`
	PostShowTimes      int64     `gorm:"column:post_show_times" json:"post_show_times" form:"post_show_times"`
	PostLikeTimes      int64     `gorm:"column:post_like_times" json:"post_like_times" form:"post_like_times"`
	PostCreateUserId   int64     `gorm:"column:post_create_user_id" json:"post_create_user_id" form:"post_create_user_id"`
	PostCreateUserName string    `gorm:"column:post_create_user_name" json:"post_create_user_name" form:"post_create_user_name"`
	PostUpdateUserId   int64     `gorm:"column:post_update_user_id" json:"post_update_user_id" form:"post_update_user_id"`
	PostUpdateUserName string    `gorm:"column:post_update_user_name" json:"post_update_user_name" form:"post_update_user_name"`
	PostCreateAt       time.Time `gorm:"column:post_create_at" json:"post_create_at" form:"post_create_at"`
	PostUpdateAt       time.Time `gorm:"column:post_update_at" json:"post_update_at" form:"post_update_at"`
}

func (*Post) IsValid

func (p *Post) IsValid() (err error)

type PostCate

type PostCate struct {
	model.BaseModel
	PostCateId       int64     `gorm:"primary_key;column:post_cate_id" json:"post_cate_id" form:"post_cate_id"`
	PostCateName     string    `gorm:"column:post_cate_name" json:"post_cate_name" form:"post_cate_name"`
	PostCateDes      string    `gorm:"column:post_cate_des" json:"post_cate_des" form:"post_cate_des"`
	PostCateCreateAt time.Time `gorm:"column:post_cate_create_at" json:"post_cate_create_at" form:"post_cate_create_at"`
	PostCateUpdateAt time.Time `gorm:"column:post_cate_update_at" json:"post_cate_update_at" form:"post_cate_update_at"`
}

type PostCatePost

type PostCatePost struct {
	model.BaseModel
	PostCatePostId         int64     `gorm:"primary_key;column:post_cate_post_id" json:"post_cate_post_id" form:"post_cate_post_id"`
	PostCatePostPostId     int64     `gorm:"column:post_cate_post_post_id" json:"post_cate_post_post_id" form:"post_cate_post_post_id"`
	PostCatePostPostCateId int64     `gorm:"column:post_cate_post_post_cate_id" json:"post_cate_post_post_cate_id" form:"post_cate_post_post_cate_id"`
	PostCatePostCreateAt   time.Time `gorm:"column:post_cate_post_create_at" json:"post_cate_post_create_at" form:"post_cate_post_create_at"`
	PostCatePostUpdateAt   time.Time `gorm:"column:post_cate_post_update_at" json:"post_cate_post_update_at" form:"post_cate_post_update_at"`
}

type User

type User struct {
	model.BaseModel
	UserId        int64     `gorm:"column:user_id" json:"user_id"`
	UserName      string    `gorm:"column:user_name" json:"user_name"`
	UserPassword  string    `gorm:"column:user_password" json:"user_password"`
	UserAliasName string    `gorm:"column:user_alias_name" json:"user_alias_name"`
	UserMail      string    `gorm:"column:user_mail" json:"user_mail"`
	UserAvatar    string    `gorm:"column:user_avatar" json:"user_avatar"`
	UserStatus    int64     `gorm:"column:user_status" json:"user_status"`
	UserSalt      string    `gorm:"column:user_salt" json:"user_salt"`
	UserCreateAt  time.Time `gorm:"column:user_create_at" json:"user_create_at"`
	UserUpdateAt  time.Time `gorm:"column:user_update_at" json:"user_update_at"`
}

func (*User) IsValid

func (u *User) IsValid() (err error)

* 校验数据是否有效

Jump to

Keyboard shortcuts

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