59 lines
2.1 KiB
C#
59 lines
2.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
||
using WmsLite.Api.Dtos.Common;
|
||
using WmsLite.Api.Enums;
|
||
|
||
namespace WmsLite.Api.Dtos.Location;
|
||
|
||
public class LocationBatchCreateRequest
|
||
{
|
||
[Required(ErrorMessage = "仓库编码不能为空。")]
|
||
[StringLength(64)]
|
||
public string WarehouseCode { get; set; } = string.Empty;
|
||
|
||
[Required(ErrorMessage = "库区编码不能为空。")]
|
||
[StringLength(64)]
|
||
public string AreaCode { get; set; } = string.Empty;
|
||
|
||
[Required(ErrorMessage = "分区编码不能为空。")]
|
||
[StringLength(64)]
|
||
public string ZoneCode { get; set; } = string.Empty;
|
||
|
||
[Required(ErrorMessage = "伸位编码不能为空。")]
|
||
[StringLength(64)]
|
||
public string AisleCode { get; set; } = string.Empty;
|
||
|
||
[Required]
|
||
[EnumDataType(typeof(ShelfDepthKind), ErrorMessage = "伸位类型无效。")]
|
||
public ShelfDepthKind ShelfDepthKind { get; set; }
|
||
|
||
[Range(1, int.MaxValue, ErrorMessage = "列起始须 ≥ 1。")]
|
||
public int ColumnFrom { get; set; }
|
||
|
||
[Range(1, int.MaxValue, ErrorMessage = "列结束须 ≥ 1。")]
|
||
public int ColumnTo { get; set; }
|
||
|
||
[Range(1, int.MaxValue, ErrorMessage = "层起始须 ≥ 1。")]
|
||
public int LayerFrom { get; set; }
|
||
|
||
[Range(1, int.MaxValue, ErrorMessage = "层结束须 ≥ 1。")]
|
||
public int LayerTo { get; set; }
|
||
|
||
public decimal? Height { get; set; }
|
||
|
||
[Required]
|
||
[EnumDataType(typeof(LocationStatus), ErrorMessage = "LocationStatus 无效。")]
|
||
public LocationStatus LocationStatus { get; set; } = LocationStatus.Empty;
|
||
|
||
/// <summary>占位符含 Warehouse Area Zone Aisle Row Col Layer(Zone 为分区编码),可加格式如 Row:D2。</summary>
|
||
[Required(ErrorMessage = "库位编码模板不能为空。")]
|
||
[StringLength(512)]
|
||
public string CodeTemplate { get; set; } = string.Empty;
|
||
|
||
[StringLength(512)]
|
||
public string? NameTemplate { get; set; }
|
||
|
||
[Required]
|
||
[EnumDataType(typeof(LocationBatchDuplicatePolicy), ErrorMessage = "重复策略无效。")]
|
||
public LocationBatchDuplicatePolicy DuplicatePolicy { get; set; }
|
||
}
|