2020-05-29 14:48:27 +00:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2020-06-10 12:35:10 +00:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2020-08-27 14:01:37 +00:00
|
|
|
|
|
2020-06-10 12:35:10 +00:00
|
|
|
|
using ASC.Core.Common.EF;
|
2020-06-23 10:48:36 +00:00
|
|
|
|
using ASC.Data.Backup.Contracts;
|
2020-06-10 12:35:10 +00:00
|
|
|
|
|
2020-05-29 14:48:27 +00:00
|
|
|
|
namespace ASC.Data.Backup.EF.Model
|
|
|
|
|
{
|
|
|
|
|
[Table("backup_schedule")]
|
|
|
|
|
public class BackupSchedule : BaseEntity
|
|
|
|
|
{
|
|
|
|
|
[Key]
|
|
|
|
|
[Column("tenant_id")]
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public int TenantId { get; set; }
|
2020-05-29 14:48:27 +00:00
|
|
|
|
|
|
|
|
|
[Column("backup_mail")]
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public bool BackupMail { get; set; }
|
2020-05-29 14:48:27 +00:00
|
|
|
|
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public string Cron { get; set; }
|
2020-05-29 14:48:27 +00:00
|
|
|
|
|
|
|
|
|
[Column("backups_stored")]
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public int BackupsStored { get; set; }
|
2020-05-29 14:48:27 +00:00
|
|
|
|
|
|
|
|
|
[Column("storage_type")]
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public BackupStorageType StorageType { get; set; }
|
2020-05-29 14:48:27 +00:00
|
|
|
|
|
|
|
|
|
[Column("storage_base_path")]
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public string StorageBasePath { get; set; }
|
2020-05-29 14:48:27 +00:00
|
|
|
|
|
|
|
|
|
[Column("last_backup_time")]
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public DateTime LastBackupTime { get; set; }
|
2020-05-29 14:48:27 +00:00
|
|
|
|
|
|
|
|
|
[Column("storage_params")]
|
2020-06-10 12:35:10 +00:00
|
|
|
|
public string StorageParams { get; set; }
|
|
|
|
|
|
2020-09-30 14:47:42 +00:00
|
|
|
|
public override object[] GetKeys()
|
|
|
|
|
{
|
|
|
|
|
return new object[] { TenantId };
|
|
|
|
|
}
|
2020-05-29 14:48:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|