using Ant.Entity;
using Ant.Frame;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ant.ORM
{
public abstract class BaseEntityObj
{
///
/// 时间戳
///
internal long TimeStamp
{
get;
}
//private readonly Dictionary _Values = new Dictionary();
/////
///// 改变状态值属性
/////
//[JsonIgnore, NotMapped]
//public Dictionary Values
//{
// get; set;
//}
private EntityPersistType persistType;
///
/// 操作类型
///
[JsonIgnore, NotMapped]
public EntityPersistType PersistType
{
get { return persistType; }
set { persistType = value; }
}
/////
///// 给实体赋值
/////
///// 字段名称
///// 默认值
//protected void SetChanaged(string FieldName, object defaultValue)
//{
// if (Values.IsNull())
// Values = new Dictionary();
// if (_Values.ContainsKey(FieldName))
// {
// EntityValue val = _Values[FieldName];
// if (object.Equals(val.OriginalValue, defaultValue))
// {
// val.CurrentValue = null;
// val.IsChanage = false;
// }
// else
// {
// val.CurrentValue = defaultValue;
// val.IsChanage = true;
// Values.Add(FieldName, val);
// }
// }
// else
// {
// EntityValue val = new EntityValue();
// val.OriginalValue = defaultValue;
// val.FieldName = FieldName;
// val.IsChanage = false;
// _Values.Add(FieldName, val);
// }
//}
}
}