mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
20 lines
697 B
Go
20 lines
697 B
Go
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
|
|
}
|