models

package
v0.0.0-...-f5025ae Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	gorm.Model
	Name string `gorm:"unique"`
}

type Membership

type Membership struct {
	gorm.Model
	User  User  `gorm:"foreignkey:UID"`
	UID   uint  `gorm:"column:uid"`
	Group Group `gorm:"foreignkey:GID"`
	GID   uint  `gorm:"column:gid"`
}

type User

type User struct {
	gorm.Model
	Username  string `gorm:"unique"`
	Nickname  string `gorm:"unique"`
	Email     string `gorm:"unique"`
	FirstName string
	LastName  string
}

func (User) Validate

func (user User) Validate(db *gorm.DB)

Jump to

Keyboard shortcuts

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