package v1

import (
	"database/sql"
	"time"

	"gorm.io/plugin/soft_delete"
)

type Alert 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"`
	AlertID          string                `json:"alertID" gorm:"column:alertID"`
	LarkInstanceCode string                `json:"larkInstanceCode" gorm:"column:larkInstanceCode"`
}

func (a *Alert) TableName() string {
	return "security_alert"
}
