model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 2 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"`
	Slug    string `json:"slug"`
	Desc    string `json:"desc"`
	Content string `json:"content"`
	Draft   *bool  `json:"draft"`
}

type BaseModel

type BaseModel struct {
	ID        uint           `gorm:"primarykey" json:"id"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
}

type Friend

type Friend struct {
	BaseModel

	Name    string `json:"name"`
	Avatar  string `json:"avatar"`
	URL     string `json:"url"`
	Desc    string `json:"desc"`
	Visible bool   `json:"visible"`
}

type Site

type Site struct {
	BaseModel

	Name string `json:"name"`
	Url  string `json:"url"`
	Desc string `json:"desc"`
	Icon string `json:"icon"`
}

type User

type User struct {
	BaseModel

	Username string `json:"username"`
	Nickname string `json:"nickname"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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