|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Connected.Annotations;
|
|
|
|
|
using Connected.Data;
|
|
|
|
|
using Connected.Entities.Annotations;
|
|
|
|
|
using Connected.Entities.Consistency;
|
|
|
|
|
|
|
|
|
|
namespace Connected.Logistics.Types.WarehouseLocations;
|
|
|
|
|
/// <inheritdoc cref="IWarehouseLocation"/>
|
|
|
|
|
internal sealed record WarehouseLocation : ConsistentEntity<int>, IWarehouseLocation
|
|
|
|
|
{
|
|
|
|
|
public const string EntityKey = $"{Domain.Code}.{nameof(WarehouseLocation)}";
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc cref="IWarehouseLocation.Parent"/>
|
|
|
|
|
[Ordinal(0)]
|
|
|
|
|
public int? Parent { get; init; }
|
|
|
|
|
/// <inheritdoc cref="IWarehouseLocation.Warehouse"/>
|
|
|
|
|
[Ordinal(1)]
|
|
|
|
|
public int Warehouse { get; init; }
|
|
|
|
|
/// <inheritdoc cref="IWarehouseLocation.Name"/>
|
|
|
|
|
[Ordinal(2), MaxLength(128)]
|
|
|
|
|
public string Name { get; init; } = default!;
|
|
|
|
|
/// <inheritdoc cref="IWarehouseLocation.Code"/>
|
|
|
|
|
[Ordinal(3), MaxLength(32), Index(Unique = true)]
|
|
|
|
|
public string Code { get; init; } = default!;
|
|
|
|
|
/// <inheritdoc cref="IWarehouseLocation.Status"/>
|
|
|
|
|
[Ordinal(4)]
|
|
|
|
|
public Status Status { get; init; }
|
|
|
|
|
/// <inheritdoc cref="IWarehouseLocation.ItemCount"/>
|
|
|
|
|
[Ordinal(5)]
|
|
|
|
|
public int ItemCount { get; init; }
|
|
|
|
|
}
|