mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
initial rebuild
This commit is contained in:
19
internal/db/models/invitation.go
Normal file
19
internal/db/models/invitation.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type Invitation struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
|
||||
OrganizationID uuid.UUID `gorm:"type:uuid;not null"`
|
||||
Organization Organization `gorm:"foreignKey:OrganizationID;constraint:OnDelete:CASCADE" json:"organization"`
|
||||
Email string `gorm:"type:text;not null"`
|
||||
Role string `gorm:"type:text;default:'member';not null"`
|
||||
Status string `gorm:"type:text;default:'pending';not null"` // pending, accepted, revoked
|
||||
ExpiresAt time.Time `gorm:"not null"`
|
||||
InviterID uuid.UUID `gorm:"type:uuid;not null"`
|
||||
Timestamped
|
||||
}
|
||||
Reference in New Issue
Block a user