model

package
v0.0.0-...-1f1c2ef Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	gorm.Model

	Name        string
	Description string

	Incidents []*Incident `gorm:"many2many:incident_components;constraint:OnDelete:CASCADE;"`
}

type Incident

type Incident struct {
	gorm.Model

	Name        string
	Description string

	Severity string

	Components []*Component `gorm:"many2many:incident_components;"`
	// Metadata   []IncidentMetadata `gorm:"constraint:OnDelete:CASCADE;"`
	History []IncidentLog `gorm:"constraint:OnDelete:CASCADE;"`
}

type IncidentLog

type IncidentLog struct {
	gorm.Model

	IncidentID uint

	Status  string
	Message string
}

type User

type User struct {
	gorm.Model

	Email string `gorm:"uniqueIndex"`

	// Password is the hashed password of the user.
	Password string

	Role string

	FirstName string
	LastName  string
}

Jump to

Keyboard shortcuts

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