package entity

import (
	"time"
)

type Notification struct {
	ID         uint   `gorm:"primaryKey"`
	Policy     string `gorm:"type:varchar(255);uniqueIndex:idx_key_policy"`
	State      NotificationState
	UpdateTime time.Time `gorm:"type:timestamp"`
	IssueKey   string    `gorm:"type:varchar(255);uniqueIndex:idx_key_policy"`
	Issue      *Issue    `gorm:"foreignKey:IssueKey;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type NotificationState string

const (
	Inited NotificationState = "Inited"
)
