Files
WMSlite/WmsLite.Api/Dtos/Location/LocationBatchCreateRequest.cs
T
2026-05-31 01:03:55 +08:00

59 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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; }
}