using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IStation.Application
{
///
/// 设备属性组
///
public class ProductPropertyGroupLogicDto
{
///
///
///
public ProductPropertyGroupLogicDto() { }
///
///
///
public ProductPropertyGroupLogicDto(Model.ProductTypePropertyGroupExItems rhs, Dictionary dict = null)
{
this.ID = rhs.ID;
this.CorpID = rhs.CorpID;
this.ProductTypeID = rhs.ProductTypeID;
this.Name = rhs.Name;
this.SortCode = rhs.SortCode;
this.Description = rhs.Description;
this.Items = rhs.Items?.Select(x => {
string value = null;
if (dict != null && dict.Count > 0)
{
if (dict.ContainsKey(x.ID))
{
value = dict[x.ID];
}
}
var property = new ProductPropertyLogicDto(x, value);
return property;
}).ToList();
}
///
/// 标识
///
public long ID { get; set; }
///
/// 客户标识
///
public long CorpID { get; set; }
///
/// 设备类型标识
///
public long ProductTypeID { get; set; }
///
/// 名称
///
public string Name { get; set; }
///
/// 排序码
///
public int SortCode { get; set; }
///
/// 说明
///
public string Description { get; set; }
///
/// 属性集合
///
public List Items { get; set; }
}
}