using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BO.Utils;
using Forks.EnterpriseServices.DomainObjects2;
namespace BO.BO
{
//本地有数据库 并且需要同步的
[KeyField("ID", KeyGenType.identity)]
public abstract class LocalSyncBase
{
public abstract string GetDtoJson();
///
/// 本地自增ID
///
public long ID { get; set; }
///
/// 是否同步到中间服务器上
///
public bool IsSynced { get; set; }
///
/// 中间服务器ID
///
public long? Service_ID { get; set; }
///
/// 上传中间服务器时间
///
public DateTime? SyncTime { get; set; }
///
/// 是否要在服务器上删除 此字段为了删除服务器上的数据用的
///
public bool WillBeDeleted{ get; set; }
///
/// 是否要在服务器上修改 此字段为了修改服务器上的数据用的
///
public bool WillBeUpdated { get; set; }
//已经删除的记录 相当于作废的记录 查询的时候要过滤 为了保存原始的记录 用删除标记
public bool IsDeleted { get; set; }
///
/// 设置删除的时间
///
public DateTime? DeleteTime { get; set; }
protected DateTime mCreateTime=DateTime.Now;
///
/// 每条记录都要记录创建时间
///
public DateTime CreateTime
{ get { return mCreateTime; }
set { mCreateTime = value; }
}
private string mCreateUserName = ButcherAppContext.Context.UserConfig.UserName;
///
/// 每条记录都要记录创建人 将来可可以记录标识用
///
public string CreateUserName { get { return mCreateUserName; }set { mCreateUserName = value; } }
}
}