package nbi_file

import (
	"be.ems/lib/file"
)

const (
	INVOKE_FILE_EXPORT = "exportTable"
)

var CDRTableMapper map[string]string = map[string]string{
	"ims":  "cdr_event_ims",
	"smf":  "cdr_event_smf",
	"smsc": "cdr_event_smsc",
	"sms":  "cdr_event_smsc",
}

var LogTableMapper map[string]string = map[string]string{
	"operate":  "sys_log_operate",
	"security": "sys_log_login",
	"alarm":    "alarm_log",
}

type SysJob struct {
	JobID        int64  `gorm:"column:job_id;primary_key;auto_increment" json:"job_id"`        //任务ID
	InvokeTarget string `gorm:"column:invoke_target" json:"invoke_target"`                     //调用目标字符串
	TargetParams string `gorm:"column:target_params;type:json" json:"target_params,omitempty"` //调用目标传入参数
}

func (s *SysJob) TableName() string {
	return "sys_job"
}

type FileNBI struct {
	file.FileInfo
}

type FileNBIQuery struct {
	Category  string   `form:"category" binding:"required"`
	Type      string   `form:"type" binding:"required"`
	DateIndex string   `form:"dateIndex"`
	Path      string   `json:"path" form:"path"`
	FileNames []string `json:"fileName" form:"fileName"`
	Suffix    string   `form:"suffix"`
	PageNum   int64    `form:"pageNum"`
	PageSize  int64    `form:"pageSize"`
}
