2025-05-14 15:13:30 +10:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
using PARR.DAL.Context;
|
|
|
|
|
|
using PARR.DAL.Models.Base;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PARR.DAL.Models.Unit
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
[Table("UnitInValues", Schema = DataContextSettings.Unit)]
|
|
|
|
|
|
[Comment("Таблица связи ЭК с полями и со значениями")]
|
2025-09-22 15:25:17 +10:00
|
|
|
|
[PrimaryKey(nameof(UnitId), nameof(FieldId), nameof(ValueId))]
|
2025-11-21 10:56:30 +10:00
|
|
|
|
[Index(nameof(FieldId), nameof(ValueId))]
|
2025-12-29 12:30:09 +10:00
|
|
|
|
[Index(nameof(UnitId), nameof(FieldId))]
|
|
|
|
|
|
[Index(nameof(FieldId), nameof(UnitId))]
|
2025-05-14 15:13:30 +10:00
|
|
|
|
public class UnitInValue : IBaseDateModified, IBaseDateCreated
|
|
|
|
|
|
{
|
|
|
|
|
|
public Guid UnitId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid FieldId { get; set; }
|
|
|
|
|
|
|
2025-05-21 11:53:07 +10:00
|
|
|
|
public Guid ValueId { get; set; }
|
2025-05-14 15:13:30 +10:00
|
|
|
|
|
|
|
|
|
|
public DateTimeOffset DateCreated { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public DateTimeOffset? DateModified { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(UnitId))]
|
|
|
|
|
|
public Unit? Unit { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(FieldId))]
|
|
|
|
|
|
public UnitField? Field { get; set; }
|
|
|
|
|
|
|
2025-05-21 11:53:07 +10:00
|
|
|
|
[ForeignKey(nameof(ValueId))]
|
2025-05-14 15:13:30 +10:00
|
|
|
|
public UnitFieldValue? Value { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|