models

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 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
	ID        uint
	Name      string `gorm:"index:,unique"`
	Members   []User `gorm:"many2many:user_groups;"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (Group) HasMember

func (g Group) HasMember(user User) bool

type User

type User struct {
	gorm.Model
	Uuid   string  `gorm:"index:,unique"`
	Groups []Group `gorm:"many2many:user_groups;"`
}

func (User) Info

func (u User) Info(api slack.Client) *slack.User

Jump to

Keyboard shortcuts

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