package v1

import (
	"database/sql"
	"time"

	"gorm.io/plugin/soft_delete"
)

type AlertRecord struct {
	ID              uint64                `json:"id" gorm:"primary_key;AUTO_INCREMENT;column:id"`
	CreatedAt       time.Time             `json:"createdAt" gorm:"column:createdAt"`
	UpdatedAt       sql.NullTime          `json:"updatedAt" gorm:"column:updatedAt"`
	DeletedAt       sql.NullTime          `json:"deletedAt" gorm:"column:deletedAt"`
	IsDel           soft_delete.DeletedAt `json:"isDel" gorm:"column:isDel;softDelete:flag,DeletedAtField:DeletedAt"`
	AlertRuleShadow string                `json:"alertRuleShadow" gorm:"column:alertRuleShadow"`
	ExpiredAt       time.Time             `json:"expiredAt" gorm:"column:expiredAt"`
	LarkMsgShadow   string                `json:"larkMsgShadow" gorm:"column:larkMsgShadow"`
}

func (ar *AlertRecord) TableName() string {
	return "alert_record"
}
