mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 00:10:25 +08:00 
			
		
		
		
	* feat: 优化数据库 BINLOG 同步机制 * feat: 删除数据库实例前需删除关联的数据库备份与恢复任务 * refactor: 重构数据库备份与恢复模块 * feat: 定时清理数据库备份历史和本地 Binlog 文件 * feat: 压缩数据库备份文件
		
			
				
	
	
		
			30 lines
		
	
	
		
			615 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			615 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package entity
 | 
						|
 | 
						|
import (
 | 
						|
	"mayfly-go/pkg/model"
 | 
						|
	"time"
 | 
						|
)
 | 
						|
 | 
						|
// DbBinlogHistory 数据库 binlog 历史
 | 
						|
type DbBinlogHistory struct {
 | 
						|
	model.DeletedModel
 | 
						|
 | 
						|
	CreateTime     time.Time `json:"createTime"` // 创建时间: 2023-11-08 02:00:00
 | 
						|
	FileName       string
 | 
						|
	FileSize       int64
 | 
						|
	Sequence       int64
 | 
						|
	FirstEventTime time.Time
 | 
						|
	LastEventTime  time.Time
 | 
						|
	DbInstanceId   uint64 `json:"dbInstanceId"`
 | 
						|
}
 | 
						|
 | 
						|
func (d *DbBinlogHistory) TableName() string {
 | 
						|
	return "t_db_binlog_history"
 | 
						|
}
 | 
						|
 | 
						|
type BinlogInfo struct {
 | 
						|
	FileName string `json:"fileName"`
 | 
						|
	Sequence int64  `json:"sequence"`
 | 
						|
	Position int64  `json:"position"`
 | 
						|
}
 |