package model

import (
	"time"

	"gorm.io/plugin/soft_delete"
)

// BaseModel 是所有模型的基础结构
type BaseModel struct {
	ID        uint                  `gorm:"primarykey" json:"id"`
	CreatedAt time.Time             `json:"created_at"`
	UpdatedAt time.Time             `json:"updated_at"`
	DeletedAt int64                 `json:"-" gorm:"index:deleted; default:0"`
	IsDel     soft_delete.DeletedAt `json:"-" gorm:"softDelete:flag,DeletedAtField:DeletedAt; index:deleted; default:0"`
}
