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();
|
|
|
|
/// <summary>
|
|
/// 本地自增ID
|
|
/// </summary>
|
|
public long ID { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否同步到中间服务器上
|
|
/// </summary>
|
|
public bool IsSynced { get; set; }
|
|
|
|
/// <summary>
|
|
/// 中间服务器ID
|
|
/// </summary>
|
|
public long? Service_ID { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 上传中间服务器时间
|
|
/// </summary>
|
|
public DateTime? SyncTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否要在服务器上删除 此字段为了删除服务器上的数据用的
|
|
/// </summary>
|
|
public bool WillBeDeleted{ get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否要在服务器上修改 此字段为了修改服务器上的数据用的
|
|
/// </summary>
|
|
public bool WillBeUpdated { get; set; }
|
|
|
|
|
|
//已经删除的记录 相当于作废的记录 查询的时候要过滤 为了保存原始的记录 用删除标记
|
|
public bool IsDeleted { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设置删除的时间
|
|
/// </summary>
|
|
public DateTime? DeleteTime { get; set; }
|
|
|
|
protected DateTime mCreateTime=DateTime.Now;
|
|
|
|
/// <summary>
|
|
/// 每条记录都要记录创建时间
|
|
/// </summary>
|
|
public DateTime CreateTime
|
|
{ get { return mCreateTime; }
|
|
set { mCreateTime = value; }
|
|
}
|
|
|
|
|
|
private string mCreateUserName = ButcherAppContext.Context.UserConfig.UserName;
|
|
|
|
/// <summary>
|
|
/// 每条记录都要记录创建人 将来可可以记录标识用
|
|
/// </summary>
|
|
public string CreateUserName { get { return mCreateUserName; }set { mCreateUserName = value; } }
|
|
|
|
|
|
}
|
|
}
|