Files
phishingclub/backend/database/programRecipientGroup.go
RonniSkansing dc9a92c99d added program pre
Signed-off-by: RonniSkansing <rskansing@gmail.com>
2026-11-07 14:38:33 +01:00

24 lines
647 B
Go

package database
import (
"github.com/google/uuid"
)
const (
PROGRAM_RECIPIENT_GROUP_TABLE = "program_recipient_groups"
)
// ProgramRecipientGroup is the join table of recipient groups assigned to a
// program. Membership of these groups drives enrollment.
type ProgramRecipientGroup struct {
ProgramID *uuid.UUID `gorm:"not null;index;type:uuid;uniqueIndex:idx_program_recipient_group;"`
Program *Program
RecipientGroupID *uuid.UUID `gorm:"not null;index;type:uuid;uniqueIndex:idx_program_recipient_group;"`
RecipientGroup *RecipientGroup
}
func (ProgramRecipientGroup) TableName() string {
return PROGRAM_RECIPIENT_GROUP_TABLE
}