models

package
v0.0.0-...-d16b773 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	BaseModel
	Title       string `json:"title"`
	Abstract    string `json:"abstract"`
	Content     string `json:"content"`
	UserId      uint   `json:"user_id"`
	CategoryId  uint   `json:"category_id"`
	ArticleType int32  `json:"article_type"`
	IsTop       int32  `json:"is_top"`
	IsPublished int32  `json:"is_published"`
	IsDeleted   int32  `json:"is_deleted"`
}

Article 文章表结构.

type BaseModel

type BaseModel struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Category

type Category struct {
	BaseModel
	UserId    uint   `json:"user_id"`
	Title     string `json:"title"`
	IsDeleted int32  `json:"is_deleted"`
}

Category 分类表结构.

type User

type User struct {
	BaseModel
	UserName  string `json:"user_name"`
	NickName  string `json:"nick_name"`
	Uid       string `json:"uid"`
	Email     string `json:"email"`
	Password  string `json:"password"`
	Phone     string `json:"phone"`
	AvatarUrl string `json:"avatar_url"`
	Level     int    `json:"level"`
	IsLocked  int    `json:"is_locked"`
	IsDeleted int    `json:"is_deleted"`
}

User 用户表结构.

Jump to

Keyboard shortcuts

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