StorageLocationDto.cs 2.75 KB
using System;
using System.Text.Json.Serialization;

namespace Rcs.Application.DTOs
{
    /// <summary>
    /// 库位DTO
    /// @author zzy
    /// </summary>
    public class StorageLocationDto
    {
        public string LocationId { get; set; }
        public string AreaId { get; set; }
        public string? MapNodeId { get; set; }
        public string? LocationTypeId { get; set; }
        public string LocationCode { get; set; }
        public string? LocationName { get; set; }
        public int? LayerNumber { get; set; }
        public double? Orientation { get; set; }

        /// <summary>
        /// 宽度(单位:mm)
        /// @author zzy
        /// </summary>
        public double? Width { get; set; }

        /// <summary>
        /// 深度(单位:mm)
        /// @author zzy
        /// </summary>
        public double? Depth { get; set; }

        /// <summary>
        /// 高度(单位:mm)
        /// @author zzy
        /// </summary>
        public double? Height { get; set; }

        /// <summary>
        /// 最大载重(单位:kg)
        /// @author zzy
        /// </summary>
        public double? MaxLoadWeight { get; set; }

        public int Status { get; set; }
        public bool IsActive { get; set; }

        /// <summary>
        /// 所属库区(忽略序列化以避免循环引用)
        /// </summary>
        [JsonIgnore]
        public StorageAreaDto? StorageArea { get; set; }

        /// <summary>
        /// 储位类型
        /// @author zzy
        /// </summary>
        public StorageLocationTypeDto? LocationType { get; set; }
    }

    /// <summary>
    /// Storage location list item DTO.
    /// </summary>
    public class StorageLocationListItemDto
    {
        public string LocationId { get; set; } = string.Empty;
        public string AreaId { get; set; } = string.Empty;
        public string? AreaCode { get; set; }
        public string? AreaName { get; set; }
        public string? MapNodeId { get; set; }
        public string? MapNodeCode { get; set; }
        public string? MapNodeName { get; set; }
        public string? LocationTypeId { get; set; }
        public string? LocationTypeCode { get; set; }
        public string? LocationTypeName { get; set; }
        public string LocationCode { get; set; } = string.Empty;
        public string? LocationName { get; set; }
        public int? LayerNumber { get; set; }
        public double? Orientation { get; set; }
        public double? Width { get; set; }
        public double? Depth { get; set; }
        public double? Height { get; set; }
        public double? MaxLoadWeight { get; set; }
        public int Status { get; set; }
        public bool IsActive { get; set; }
        public DateTime CreatedAt { get; set; }
    }
}