func CreateRole(db *gorm.DB, name string) bool {
	checkRole := FetchRoleByName(db, name)
	if checkRole.ID != 0 {
		return false
	}
	role := Role{Name: name}
	if err := db.Create(&role).Error; err != nil {
		fmt.Println("Could not create role")
		return false
	}
	return true
}
CreateRole is a method which creates a role using gorm
package structs
import (
	"fmt"
	"github.com/uberswe/beubo/pkg/utility"
	"gorm.io/gorm"
)
type Role struct {
	gorm.Model
	Name     string     `gorm:"size:255"`
	Users    []*User    `gorm:"many2many:user_roles;"`
	Features []*Feature `gorm:"many2many:role_features;"`
}
type Feature struct {
	gorm.Model
	Key   string  `gorm:"size:255"`
	Roles []*Role `gorm:"many2many:role_features;"`
}
func (r Role) IsDefault() bool {
	if r.Name == "Administrator" || r.Name == "Member" {
		return true
	}
	return false
}
func (r Role) HasFeature(db *gorm.DB, f Feature) bool {
	features := []Feature{}
	_ = db.Model(&r).Where("key = ?", f.Key).Association("Features").Find(&features)
	if len(features) >= 1 {
		return true
	}
	return false
}