fix Синхронизации
This commit is contained in:
24
PARR.DAL/Models/V1/V1_Application.cs
Normal file
24
PARR.DAL/Models/V1/V1_Application.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_Applications")]
|
||||
public class V1_Application : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public required string Name { get; set; }
|
||||
|
||||
public Guid ApplicationTypeId { get; set; }
|
||||
[ForeignKey(nameof(ApplicationTypeId))]
|
||||
public V1_ApplicationType? ApplicationType { get; set; }
|
||||
|
||||
|
||||
public ICollection<V1_ApplicationInHost> V1_ApplicationsInHosts { get; set; } = new HashSet<V1_ApplicationInHost>();
|
||||
//public ICollection<Application> Applications { get;set; } = new HashSet<Application>();
|
||||
}
|
||||
}
|
||||
23
PARR.DAL/Models/V1/V1_ApplicationInHost.cs
Normal file
23
PARR.DAL/Models/V1/V1_ApplicationInHost.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_ApplicationsInHost")]
|
||||
public class V1_ApplicationInHost : IBase
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationId))]
|
||||
public Application? Application { get; set; }
|
||||
|
||||
public Guid HostId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(HostId))]
|
||||
public V1_Host? Host { get; set; }
|
||||
}
|
||||
}
|
||||
18
PARR.DAL/Models/V1/V1_ApplicationType.cs
Normal file
18
PARR.DAL/Models/V1/V1_ApplicationType.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_ApplicationTypes")]
|
||||
public class V1_ApplicationType : IBase
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
public ICollection<V1_ApplicationType> V1_ApplicationTypes { get; set; } = new HashSet<V1_ApplicationType>();
|
||||
}
|
||||
}
|
||||
27
PARR.DAL/Models/V1/V1_Host.cs
Normal file
27
PARR.DAL/Models/V1/V1_Host.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_Hosts")]
|
||||
public class V1_Host : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public string? HostName { get; set; }
|
||||
public required string IP { get; set; }
|
||||
public string? RegionalEK { get; set; }
|
||||
public string? LinkEK { get; set; }
|
||||
public string? Status { get; set; }
|
||||
public string? WorkGroup { get; set; }
|
||||
public string? Responsible { get; set; }
|
||||
|
||||
|
||||
|
||||
public ICollection<V1_JobJournal> JobJournals { get; set; } = new HashSet<V1_JobJournal>();
|
||||
public ICollection<V1_ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<V1_ApplicationInHost>();
|
||||
}
|
||||
}
|
||||
50
PARR.DAL/Models/V1/V1_Job.cs
Normal file
50
PARR.DAL/Models/V1/V1_Job.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_Jobs")]
|
||||
public class V1_Job : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string ScriptName { get; set; }
|
||||
|
||||
|
||||
public Guid JobModeId { get; set; }
|
||||
[ForeignKey(nameof(JobModeId))]
|
||||
public V1_JobMode? JobMode { get; set; }
|
||||
|
||||
public Guid? JobCategoryId { get; set; }
|
||||
[ForeignKey(nameof(JobCategoryId))]
|
||||
public V1_JobCategory? JobCategorye { get; set; }
|
||||
|
||||
public Guid? JobTypeId { get; set; }
|
||||
[ForeignKey(nameof(JobTypeId))]
|
||||
public V1_JobType? JobType { get; set; }
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
[ForeignKey(nameof(ApplicationId))]
|
||||
public Application? Application { get; set; }
|
||||
/// <summary>
|
||||
/// Частота запуска Job в минутах
|
||||
/// </summary>
|
||||
public int Frequency { get; set; }
|
||||
/// <summary>
|
||||
/// В режиме manual значит время регистрации регламентной работы АСУ ЕСПП, в auto - время старта Job.
|
||||
/// </summary>
|
||||
public DateTimeOffset StartAt { get; set; }
|
||||
/// <summary>
|
||||
/// Активация Job
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
|
||||
public ICollection<V1_JobJournal> Journals { get; set; } = new HashSet<V1_JobJournal>();
|
||||
|
||||
}
|
||||
}
|
||||
24
PARR.DAL/Models/V1/V1_JobCategory.cs
Normal file
24
PARR.DAL/Models/V1/V1_JobCategory.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_JobCategorys")]
|
||||
public class V1_JobCategory : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
/// <summary>
|
||||
/// app, db
|
||||
/// </summary>
|
||||
public required string Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
|
||||
public ICollection<V1_Job> Jobs { get; set; } = new HashSet<V1_Job>();
|
||||
}
|
||||
}
|
||||
39
PARR.DAL/Models/V1/V1_JobJournal.cs
Normal file
39
PARR.DAL/Models/V1/V1_JobJournal.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_JobJournals")]
|
||||
public class V1_JobJournal : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public DateTimeOffset DateOper { get; set; }
|
||||
public string? Other { get; set; }
|
||||
//Возможно нужно перенести в Job
|
||||
public int? TimeOut { get; set; }
|
||||
//Возможно нужно перенести в Job
|
||||
public string? Info { get; set; }
|
||||
|
||||
|
||||
|
||||
public Guid JobStatusId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(JobStatusId))]
|
||||
public V1_JobStatus? Status { get; set; }
|
||||
|
||||
|
||||
public Guid HostId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(HostId))]
|
||||
public V1_Host? Host { get; set; }
|
||||
|
||||
|
||||
public Guid JobId { get; set; }
|
||||
[ForeignKey(nameof(JobId))]
|
||||
public V1_Job? Job { get; set; }
|
||||
}
|
||||
}
|
||||
23
PARR.DAL/Models/V1/V1_JobMode.cs
Normal file
23
PARR.DAL/Models/V1/V1_JobMode.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_JobModes")]
|
||||
public class V1_JobMode : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
/// <summary>
|
||||
/// manual, auto
|
||||
/// </summary>
|
||||
public required string Name { get; set; }
|
||||
|
||||
|
||||
|
||||
public ICollection<V1_Job> Jobs { get; set; } = new HashSet<V1_Job>();
|
||||
}
|
||||
}
|
||||
24
PARR.DAL/Models/V1/V1_JobStatus.cs
Normal file
24
PARR.DAL/Models/V1/V1_JobStatus.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_JobStatuses")]
|
||||
public class V1_JobStatus : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
/// <summary>
|
||||
/// started, finished, timeout, error
|
||||
/// </summary>
|
||||
public required string Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
|
||||
public ICollection<V1_JobJournal> Journals { get; set; } = new HashSet<V1_JobJournal>();
|
||||
}
|
||||
}
|
||||
23
PARR.DAL/Models/V1/V1_JobType.cs
Normal file
23
PARR.DAL/Models/V1/V1_JobType.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
[Table("V1_JobTypes")]
|
||||
public class V1_JobType : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
/// <summary>
|
||||
/// log-rotate, vacuum-psqld
|
||||
/// </summary>
|
||||
public required string Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
public ICollection<V1_Job> Jobs { get; set; } = new HashSet<V1_Job>();
|
||||
}
|
||||
}
|
||||
19
PARR.DAL/Models/V1/V1_Scheduler.cs
Normal file
19
PARR.DAL/Models/V1/V1_Scheduler.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.V1
|
||||
{
|
||||
//[Table("Schedulers")]
|
||||
//public class Scheduler : IBase
|
||||
//{
|
||||
// //[Key]
|
||||
// //public Guid Id { get; set; }
|
||||
// //public DateTimeOffset DateCreated { get; set; }
|
||||
// //public DateTimeOffset? DateModified { get; set; }
|
||||
// //public string? Name { get; set; }
|
||||
// //public int Frequency { get; set; }
|
||||
// //public required DateTimeOffset StartAt { get; set; }
|
||||
// //public bool IsEnabled { get; set; }
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user