Laservall_solidworks_inject/Model/SwAssDocTreeModel.cs

70 lines
1.6 KiB
C#

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Laservall.Solidworks.Model
{
public class SwAssDocTreeModel
{
public string drawingNo { get; set; }
public string docPath { get; set; }
public string configName { get; set; }
public int swMateCount { get; set; }
public List<SwAssDocTreeModel> children { get; set; }
public bool isAss { get; set; }
public bool isOutSourcing { get; set; }
public int quantity { get; set; }
public Dictionary<string, string> props { get; set; }
public string Props
{
get
{
//StringBuilder stringBuilder = new StringBuilder();
//if (props != null)
//{
// foreach (KeyValuePair<string, string> prop in props)
// {
// stringBuilder.AppendLine(prop.Key + ":" + prop.Value + ";");
// }
//}
//return stringBuilder.ToString();
return JsonConvert.SerializeObject(props);
}
}
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}
if (!(obj is SwAssDocTreeModel swAssDocTreeModel))
{
return false;
}
return drawingNo == swAssDocTreeModel.drawingNo;
}
public override int GetHashCode()
{
return drawingNo.GetHashCode();
}
}
}