models

package
v0.0.0-...-74262d2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forum

type Forum struct {
	Id          uint64 `gorm:"primaryKey"`
	ParentId    *uint64
	Name        string
	Description sql.NullString
	IsLink      bool `gorm:"default:false"`
	Link        sql.NullString
	Children    []Forum `gorm:"foreignkey:ParentId"`
	Topics      []Topic
	CreatedAt   time.Time
	UpdatedAt   time.Time
	DeletedAt   gorm.DeletedAt `gorm:"index"`
}

type Topic

type Topic struct {
	ForumId   uint64
	Forum     *Forum `gorm:"foreignKey:ForumId"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

type User

type User struct {
	Id               uint64 `gorm:"primaryKey"`
	Username         string `gorm:"unique"`
	Password         string
	Email            string `gorm:"unique"`
	Avatar           sql.NullString
	Signature        sql.NullString
	EmailConfirmedAt sql.NullTime
	LastSeen         sql.NullTime
	CreatedAt        time.Time
	UpdatedAt        time.Time
	DeletedAt        gorm.DeletedAt `gorm:"index"`
}

User model

func (*User) SetPassword

func (user *User) SetPassword(password string)

Jump to

Keyboard shortcuts

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