首次提交:添加src文件夹代码
This commit is contained in:
39
Cowain.Bake.Model/Entity/UserEntity.cs
Normal file
39
Cowain.Bake.Model/Entity/UserEntity.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Model.Entity
|
||||
{
|
||||
public class UserEntity : TUserManage
|
||||
{
|
||||
/// <summary>
|
||||
/// 子类构造函数
|
||||
/// </summary>
|
||||
/// <param name="parent">父类对象</param>
|
||||
public void Copy(TUserManage parent)
|
||||
{
|
||||
var parentProperties = parent.GetType().GetProperties();
|
||||
foreach (var parentProperty in parentProperties)
|
||||
{
|
||||
var thisProperty = this.GetType().GetProperty(parentProperty.Name, parentProperty.PropertyType);
|
||||
var value = parentProperty.GetValue(parent);
|
||||
if (thisProperty != null && value != null && thisProperty.CanWrite)
|
||||
{
|
||||
thisProperty.SetValue(this, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
public List<TMenuInfo> Menus { get; set; } = new List<TMenuInfo>();
|
||||
/// <summary>
|
||||
/// 工单
|
||||
/// </summary>
|
||||
public string JobNum { get; set; }
|
||||
/// <summary>
|
||||
/// 工艺
|
||||
/// </summary>
|
||||
public string ProcessParamName { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user