2025-05-14 15:13:30 +10:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2026-04-15 09:35:03 +10:00
|
|
|
|
using PARR.Domain.Constants;
|
2026-04-13 16:58:30 +10:00
|
|
|
|
using PARR.Domain.Entities.Base;
|
2025-05-14 15:13:30 +10:00
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
2026-04-30 10:35:31 +10:00
|
|
|
|
namespace PARR.Domain.Entities.Unit
|
2025-05-14 15:13:30 +10:00
|
|
|
|
{
|
|
|
|
|
|
|
2026-04-15 09:35:03 +10:00
|
|
|
|
[Table("UnitInValues", Schema = DatabaseSchemas.Unit)]
|
2025-05-14 15:13:30 +10:00
|
|
|
|
[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))]
|
2026-04-13 16:58:30 +10:00
|
|
|
|
public class UnitInValue : IBaseEntityDateModified, IBaseEntityDateCreated
|
2025-05-14 15:13:30 +10:00
|
|
|
|
{
|
|
|
|
|
|
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; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|