model

package
v0.0.0-...-79dbf9b Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlogPost

type BlogPost struct {
	ID        uint      `json:"id,omitempty" gorm:"primary_key"`
	Author    string    `json:"author,omitempty"`
	Title     string    `json:"title" validate:"required"`
	Content   string    `json:"content" validate:"required"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

BlogPost reprensents a blog post

type User

type User struct {
	ID          uint `gorm:"primary_key"`
	TokenUserID string
	Email       string `validate:"required,email"`
	Password    string `validate:"required,min=10"`
	IsAdmin     bool   `json:"is_admin"`
}

User reprensents a registered user

Jump to

Keyboard shortcuts

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