БД, таблицы для ЕСПП, связь с app, обновлена Template
This commit is contained in:
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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user