feat(core,dal,domain,snapshotWorker): Воркер по управлению снапшотами. Создание сгапшотов для таблицы RobotConfigurations
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PARR.Domain.Constants;
|
||||
using PARR.Domain.Entities.Base;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace PARR.Domain.Entities.RobotEntities
|
||||
{
|
||||
/// <summary>
|
||||
/// Снимки заданий роботам
|
||||
/// </summary>
|
||||
[Table("ConfigurationSnapshots", Schema = DatabaseSchemas.Robot)]
|
||||
[Index(nameof(RobotCode), nameof(DateCreated))]
|
||||
[Comment("Снимки заданий роботам")]
|
||||
public class RobotConfigurationSnapshot : IBaseEntity
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset DateCreated { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
public int RobotCode { get; set; }
|
||||
|
||||
public int RobotStatusCode { get; set; }
|
||||
|
||||
public int TaskStatusCode { get; set; }
|
||||
|
||||
[Comment("Количество заданий в этой комбинации статусов")]
|
||||
public int Count { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(RobotCode))]
|
||||
public Robot? Robot { get; set; }
|
||||
|
||||
[ForeignKey(nameof(RobotStatusCode))]
|
||||
public RobotStatus? RobotStatus { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TaskStatusCode))]
|
||||
public TaskStatus? TaskStatus { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user