You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
711 B
23 lines
711 B
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<Guid, string>, 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; }
|
|
}
|