БД, таблицы для ЕСПП, связь с app, обновлена Template
This commit is contained in:
@@ -19,6 +19,7 @@ namespace PARR.DAL.Models
|
||||
|
||||
|
||||
public ICollection<ApplicationInHost> ApplicationsInHosts { get; set; } = new HashSet<ApplicationInHost>();
|
||||
//public ICollection<Application> Applications { get;set; } = new HashSet<Application>();
|
||||
|
||||
public ICollection<ApplicationsInWork> ApplicationsInWorks { get; set; } = new HashSet<ApplicationsInWork>();
|
||||
}
|
||||
}
|
||||
|
||||
31
PARR.DAL/Models/ApplicationsInWork.cs
Normal file
31
PARR.DAL/Models/ApplicationsInWork.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("ApplicationsInWorks")]
|
||||
[Index(nameof(WorkId), nameof(ApplicationId), IsUnique = true)]
|
||||
public class ApplicationsInWork : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public Guid WorkId { get; set; }
|
||||
|
||||
public Guid ApplicationId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(WorkId))]
|
||||
public Work? Work { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationId))]
|
||||
public Application? Application { get; set; }
|
||||
|
||||
public ICollection<Template> Templates { get; set; } = new HashSet<Template>();
|
||||
}
|
||||
}
|
||||
23
PARR.DAL/Models/Process.cs
Normal file
23
PARR.DAL/Models/Process.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
|
||||
{
|
||||
[Table("Processes")]
|
||||
public class Process : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public int EsppId { get; set; }
|
||||
|
||||
public ICollection<Subprocess> Subprocesses { get; set; } = new HashSet<Subprocess>();
|
||||
}
|
||||
}
|
||||
28
PARR.DAL/Models/Subprocess.cs
Normal file
28
PARR.DAL/Models/Subprocess.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Subprocesses")]
|
||||
public class Subprocess : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public int EsppId { get; set; }
|
||||
|
||||
public Guid ProcessId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ProcessId))]
|
||||
public Process? Process { get; set; }
|
||||
|
||||
public ICollection<Tnk> Tnks { get; set; } = new HashSet<Tnk>();
|
||||
}
|
||||
}
|
||||
@@ -1,41 +1,74 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Templates")]
|
||||
[Index(nameof(Name), IsUnique = true)]
|
||||
public class Template : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
//??? Рабочая группа
|
||||
public required string WorkGroup { get; set; }
|
||||
|
||||
public required string ShortDescription { get; set; }
|
||||
|
||||
//settings ? регламентная работа
|
||||
public required string Category { get; set; }
|
||||
|
||||
// ДВС, ??
|
||||
public required string ResponseArea { get; set; }
|
||||
|
||||
//works ??
|
||||
public required string Duration { get; set; }
|
||||
public required string EK { get; set; }
|
||||
|
||||
//public required string EK { get; set; }
|
||||
|
||||
// settings
|
||||
public required string Initiator { get; set; }
|
||||
|
||||
public required string FullDescription { get; set; }
|
||||
|
||||
// settings
|
||||
public required string ClosingCode { get; set; }
|
||||
|
||||
// settings
|
||||
public required string Solution { get; set; }
|
||||
public required string Process { get; set; }
|
||||
public required string SubProcess { get; set; }
|
||||
public required string TNK { get; set; }
|
||||
public required string Work { get; set; }
|
||||
|
||||
//public required string Process { get; set; }
|
||||
|
||||
//public required string SubProcess { get; set; }
|
||||
|
||||
//public required string TNK { get; set; }
|
||||
|
||||
//public required string Work { get; set; }
|
||||
|
||||
// исполнитель??
|
||||
public required string Worker { get; set; }
|
||||
|
||||
public int StatusCode { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(StatusCode))]
|
||||
public StatusTemplate? StatusTemplate { get; set; }
|
||||
|
||||
//public required string Status { get; set; }
|
||||
|
||||
public Guid ApplicationInWorkId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ApplicationInWorkId))]
|
||||
public ApplicationsInWork? ApplicationsInWork { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
28
PARR.DAL/Models/Tnk.cs
Normal file
28
PARR.DAL/Models/Tnk.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Tnks")]
|
||||
public class Tnk : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public int EsppId { get; set; }
|
||||
|
||||
public Guid SubprocessId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(SubprocessId))]
|
||||
public Subprocess? Subprocess { get; set; }
|
||||
|
||||
public ICollection<Work> Works { get; set; } = new HashSet<Work>();
|
||||
}
|
||||
}
|
||||
28
PARR.DAL/Models/Work.cs
Normal file
28
PARR.DAL/Models/Work.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using PARR.DAL.Models.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.DAL.Models
|
||||
{
|
||||
[Table("Works")]
|
||||
public class Work : IBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public int EsppId { get; set; }
|
||||
|
||||
public Guid TnkId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TnkId))]
|
||||
public Tnk? Tnk { get; set; }
|
||||
|
||||
public ICollection<ApplicationsInWork> ApplicationsInWorks { get; set; } = new HashSet<ApplicationsInWork>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user