package v1

import (
	"database/sql"
	"time"

	"gorm.io/plugin/soft_delete"
)

type DownLoadAlert 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"`
	User      string                `json:"user" gorm:"column:user"`
	DocTitle  string                `json:"docTitle" gorm:"column:docTitle"`
	AlertType int                   `json:"alertType" gorm:"column:alertType"`
}

func (a *DownLoadAlert) TableName() string {
	return "download_alert"
}

type AlertRecord struct {
	User     string    `json:"user" gorm:"column:user"`
	LastTime time.Time `json:"lastTime" gorm:"column:lastTime"`
}
