models

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KindRole added in v1.0.6

type KindRole string
const (
	CustomerRole KindRole = "customer"
	StaffRole    KindRole = "staff"
)

func (KindRole) String added in v1.0.6

func (k KindRole) String() string

type KindSubscription added in v1.0.6

type KindSubscription string
const (
	Startup  KindSubscription = "startup"
	Business KindSubscription = "business"
)

func (KindSubscription) String added in v1.0.6

func (k KindSubscription) String() string

type Project

type Project struct {
	Id        int       `json:"id" gorm:"primaryKey;unique;autoIncrement" example:"66"`
	UserUuid  uuid.UUID `json:"userId" gorm:"index:idx_user_id_name,unique" example:"666"`
	Name      string    `json:"name" gorm:"index:idx_user_id_name,unique" example:"bla-bla-bla.com"`
	Token     string    `json:"token" example:"38fa45ebb919g5d966122bf9g42a38ceb1e4f6eddf1da70ef00afbdc38197d8f"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

type ProjectRepository

type ProjectRepository interface {
	GetById(Id int) (*Project, error)
	GetByToken(token string) (*Project, error)
	GetByUserUuid(userUuid uuid.UUID) ([]Project, error)
	Create(project *Project) error
	Update(project *Project) error
	Delete(project *Project) error
}

Jump to

Keyboard shortcuts

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