persistence/DD.Persistence.Database/Entity/SchemeProperty.cs

24 lines
765 B
C#
Raw Normal View History

2025-02-05 14:30:36 +05:00
using Microsoft.EntityFrameworkCore;
2025-02-05 17:20:18 +05:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2025-02-05 14:30:36 +05:00
using System.Text.Json;
namespace DD.Persistence.Database.Entity;
2025-02-05 17:20:18 +05:00
[Table("scheme_property")]
2025-02-05 14:30:36 +05:00
[PrimaryKey(nameof(DiscriminatorId), nameof(Index))]
2025-02-05 17:20:18 +05:00
public class SchemeProperty
{
2025-02-05 14:30:36 +05:00
[Comment("Идентификатор схемы данных")]
public Guid DiscriminatorId { get; set; }
2025-02-05 14:30:36 +05:00
[Comment("Индекс поля")]
public int Index { get; set; }
2025-02-05 14:30:36 +05:00
[Comment("Наименования индексируемого поля")]
2025-02-05 17:20:18 +05:00
public required string PropertyName { get; set; }
2025-02-05 14:30:36 +05:00
[Comment("Тип индексируемого поля")]
2025-02-05 17:20:18 +05:00
public required JsonValueKind PropertyKind { get; set; }
}