func (d *FileLog) ToJSON() string {
	return database.ToJSON(d)
}
ToJSON file log structure to json string
package model
import (
	"database/sql/driver"
	"encoding/json"
	"errors"
	"github.com/streetbyters/agente/database"
	"github.com/streetbyters/agente/model"
	"gopkg.in/guregu/null.v3/zero"
	"time"
)
type FileLog struct {
	database.DBInterface `json:"-"`
	ID                   int64         `db:"id" json:"id"`
	NodeID               int64         `db:"node_id" json:"node_id" foreign:"fk_ra_file_logs_node_id"`
	FileID               int64         `db:"file_id" json:"file_id" foreign:"fk_ra_file_logs_file_id"`
	SourceUserID         zero.Int      `db:"source_user_id" json:"source_user_id" foreign:"fk_ra_file_logs_source_user_id"`
	Type                 model.Process `db:"type" json:"type"`
	Data                 FileLogData   `db:"data" json:"data,omitempty"`
	InsertedAt           time.Time     `db:"inserted_at" json:"inserted_at"`
}
func NewFileLog(fileID int64) *FileLog {
	return &FileLog{FileID: fileID}
}
func (d *FileLog) TableName() string {
	return "ra_file_logs"
}