organization

package
v0.0.0-...-699ca5e Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Organization

type Organization struct {
	ID        uuid.UUID  `gorm:"type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `sql:"index" json:"deleted_at"`
	Name      string     `json:"name" gorm:"index:idx_name,unique;not_null"`

	// Features for the organization
	AllowAutoCreateWorkspace bool `json:"allow_auto_create_workspace"`
}

type OrganizationRepository

type OrganizationRepository interface {
	Save(org *Organization) error
	Update(org Organization)
	Delete(organizationId string)
	FindById(organizationId string) (*Organization, error)
	All() ([]Organization, error)
}

func NewOrganizationRepository

func NewOrganizationRepository(db *gorm.DB) OrganizationRepository

type OrganizationRepositoryImpl

type OrganizationRepositoryImpl struct {
	Db *gorm.DB
}

func (OrganizationRepositoryImpl) All

func (OrganizationRepositoryImpl) Delete

func (o OrganizationRepositoryImpl) Delete(organizationId string)

func (OrganizationRepositoryImpl) FindById

func (o OrganizationRepositoryImpl) FindById(organizationId string) (*Organization, error)

func (OrganizationRepositoryImpl) Save

func (OrganizationRepositoryImpl) Update

Jump to

Keyboard shortcuts

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