models

package
v0.0.0-...-1303b49 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: 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 BaseModel

type BaseModel struct {
	ID        uint       `gorm:"column:ID;primary_key"`
	CreatedAt time.Time  `gorm:"column:CreatedAt"`
	UpdatedAt time.Time  `gorm:"column:UpdatedAt"`
	DeletedAt *time.Time `gorm:"column:DeletedAt;index"`
}

type Follow

type Follow struct {
	BaseModel
	FollowBy int `gorm:"column:FollowBy"`
	FollowTo int `gorm:"column:FollowTo"`
}

func (Follow) TableName

func (Follow) TableName() string

type Like

type Like struct {
	BaseModel
	PostID int `gorm:"column:PostID"`
	LikeBy int `gorm:"column:LikeBy"`
}

func (Like) TableName

func (Like) TableName() string

type Post

type Post struct {
	BaseModel
	Title     string `gorm:"column:Title"`
	Content   string `gorm:"column:Content"`
	CreatedBy int    `gorm:"column:CreatedBy"`
}

func (Post) TableName

func (Post) TableName() string

type ProfileView

type ProfileView struct {
	BaseModel
	ViewBy int `gorm:"column:ViewBy"`
	ViewTo int `gorm:"column:ViewTo"`
}

func (ProfileView) TableName

func (ProfileView) TableName() string

type User

type User struct {
	BaseModel
	Username string `gorm:"column:Username"`
	Password string `gorm:"column:Password"`
	Email    string `gorm:"column:Email"`
	Bio      string `gorm:"column:Bio"`
}

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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