models

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel added in v1.1.2

type BaseModel struct {
	ID        uint
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt
}

type Clapper added in v1.1.2

type Clapper struct {
	BaseModel
	UserID uint
	Name   string
	Token  string
}

type Material added in v1.1.2

type Material struct {
	ID        uint `gorm:"primary_key"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`

	Link    string
	Comment string

	ItemID      string //Unical +
	ItemOwnerID int    //Unical
	ItemType    string

	UserID uint
	User   User `gorm:"foreignKey:UserID"`
}

func GetMaterialsList added in v1.1.2

func GetMaterialsList(paginator *pagination.Paginator) (materials []Material)

GetMaterialsList return all materials

type User

type User struct {
	BaseModel
	Name     string
	Role     uint `cursor:"roleID"`
	Clappers []Clapper
}

func GetUsersList

func GetUsersList(role uint, paginator *pagination.Paginator) []User

Jump to

Keyboard shortcuts

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