fix Синхронизации
This commit is contained in:
59
PARR.DAL/Models/AIHIT/RawDataEK.cs
Normal file
59
PARR.DAL/Models/AIHIT/RawDataEK.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.AIHIT
|
||||
{
|
||||
[Table("RawDataEKs", Schema = "AIHIT")]
|
||||
public class RawDataEK:IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public string? IP { get; set; }
|
||||
public string? Metka { get; set; }
|
||||
public string? IsActive { get; set; }
|
||||
public string? IsImportant { get; set; }
|
||||
public string? CreateTime { get; set; }
|
||||
public string? AdditionalInfo { get; set; }
|
||||
public string? ResponseArea { get; set; }
|
||||
public string? EKCategory { get; set; }
|
||||
public string? EKFindCode { get; set; }
|
||||
public string? ProductCode { get; set; }
|
||||
public string? ServiceCode { get; set; }
|
||||
public string? ShortName { get; set; }
|
||||
public string? ResponsibleByEK { get; set; }
|
||||
public string? PlannedTimeToRepair { get; set; }
|
||||
public string? EKSubCategory { get; set; }
|
||||
public string? FullName { get; set; }
|
||||
public string? Prescription { get; set; }
|
||||
public string? Company { get; set; }
|
||||
public string? WorkGroup { get; set; }
|
||||
public string? Location { get; set; }
|
||||
public string? EKRevizor { get; set; }
|
||||
public string? EKRegister { get; set; }
|
||||
public string? NetworkName { get; set; }
|
||||
public string? Status { get; set; }
|
||||
public string? EKType { get; set; }
|
||||
public string? EndExplotationDate { get; set; }
|
||||
public string? StartExplotationDate { get; set; }
|
||||
public string? TargetRepairTime { get; set; }
|
||||
public string? SysModTime { get; set; }
|
||||
public string? SysModUser { get; set; }
|
||||
public string? NewEKFindCode { get; set; }
|
||||
public string? OldEKFindCode { get; set; }
|
||||
public string? CTSDirection { get; set; }
|
||||
public int? AIHID { get; set; }
|
||||
public char? IsUnreliableData { get; set; }
|
||||
public string? ShiftWorkGroup { get; set; }
|
||||
public string? ClientSoftware { get; set; }
|
||||
public string? ClientOS { get; set; }
|
||||
public string? DBType { get; set; }
|
||||
public string? APPType { get; set; }
|
||||
public string? CKBSServerType { get; set; }
|
||||
public string? IBServerType { get; set; }
|
||||
public string? InfrastructureServerType { get; set; }
|
||||
public string? MonitoringServerType { get; set; }
|
||||
}
|
||||
}
|
||||
21
PARR.DAL/Models/AIHIT/Setting.cs
Normal file
21
PARR.DAL/Models/AIHIT/Setting.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models.AIHIT
|
||||
{
|
||||
[Table("Settings", Schema = "AIHIT")]
|
||||
public class Setting : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
public string? Group { get; set; }
|
||||
public required string Name { get; set; }
|
||||
public required string Value { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
24
PARR.DAL/Models/Application.cs
Normal file
24
PARR.DAL/Models/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
|
||||
{
|
||||
[Table("Applications")]
|
||||
public class 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 ApplicationType? ApplicationType { get; set; }
|
||||
|
||||
|
||||
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
//public ICollection<Application> Applications { get;set; } = new HashSet<Application>();
|
||||
}
|
||||
}
|
||||
23
PARR.DAL/Models/ApplicationInHost.cs
Normal file
23
PARR.DAL/Models/ApplicationInHost.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationsInHost")]
|
||||
public class 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 Host? Host { get; set; }
|
||||
}
|
||||
}
|
||||
18
PARR.DAL/Models/ApplicationType.cs
Normal file
18
PARR.DAL/Models/ApplicationType.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationTypes")]
|
||||
public class 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<ApplicationType> ApplicationTypes { get; set; } = new HashSet<ApplicationType>();
|
||||
}
|
||||
}
|
||||
27
PARR.DAL/Models/Hosts.cs
Normal file
27
PARR.DAL/Models/Hosts.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using PARR.DAL.Models.V1;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Hosts")]
|
||||
public class 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<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
}
|
||||
}
|
||||
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