package dao

import "time"

// SysUserFile 用户文件记录表
type SysUserFile struct {
	ID              int        `gorm:"primary_key;type:int" json:"id"`          //编号
	Operator        int        `gorm:"type:int" json:"operator"`                //操作者id
	Receiver        int        `gorm:"type:int" json:"receiver"`                //接收者id
	FileID          int        `gorm:"type:int" json:"fileid"`                  //文件id
	EffectiveDate   *time.Time `gorm:"type:datetime" json:"effectiveDate"`      //阅读的有效日期
	OperationStatus string     `gorm:"type:varchar(12)" json:"operationStatus"` //操作状态
	IsDeleted       int        `gorm:"type:int;default:0" json:"isDeleted"`     //是否删除 0=未删除,1=删除
}

func (*SysUserFile) TableName() string {
	return "user_file"
}

func (uf *SysUserFile) BatchUFRecords(userfile []SysUserFile) error {
	return Db.Model(&uf).Create(&userfile).Error
}
