using System.ComponentModel.DataAnnotations; using Connected.Annotations; using Connected.Entities.Annotations; using Connected.ServiceModel.Annotations; using Connected.ServiceModel.Data; namespace Common.Distributed; [Table(Schema = CommonSchemas.CommonSchema)] internal sealed record DistributedLock : TableEntity, IDistributedLock { public const string EntityKey = $"{SchemaAttribute.SysSchema}.{nameof(DistributedLock)}"; [Ordinal(-50000), PartitionKey, MaxLength(128)] public string Entity { get; init; } = default!; [Ordinal(-49000), PrimaryKey, MaxLength(128)] public string EntityId { get; init; } = default!; [Ordinal(1)] public DateTimeOffset Expiration { get; init; } }