using OASystem.Domain.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
namespace OASystem.Domain.Entities.Groups
{
///
/// 团组流程管控
///
[SugarTable("Grp_Schedule")]
public class Grp_ScheduleInfo : EntityBase
{
///
/// 团组Id
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int DiId { get; set; }
///
/// 当前主流程
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public GrpSchedulePrimaryStepEnum PrimaryStep { get; set; }
///
/// 当前子流程
///
//[SugarColumn(IsNullable = true, ColumnDataType = "int")]
//public int DetailStep { get; set; }
///
/// 预计开始时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime ExpectBeginDt { get; set; }
///
/// 预计结束时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime ExpectEndDt { get; set; }
///
/// 实际开始时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime RealBeginDt { get; set; }
///
/// 实际结束时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime RealEndDt { get; set; }
///
/// 总负责人(SysUser.Id)
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int Leader { get; set; }
///
/// 异常状态0:正常,1:异常
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int Exception { get; set; }
}
///
/// 团组流程管控详细进度
///
[SugarTable("Grp_ScheduleDetail")]
public class Grp_ScheduleDetailInfo : EntityBase, ICloneable
{
///
/// 团组流程Id
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int ScheduleId { get; set; }
///
/// 流程
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int Step { get; set; }
///
/// 父级流程
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int ParentStep { get; set; }
///
/// 流程状态
///
/// - 0:待分配(未开始)
/// - 1:进行中
/// - 2:已完成
///
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int StepStatus { get; set; }
///
/// 负责人员(SysUser.Id)
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int Duty { get; set; }
///
/// 工作内容
///
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
public string JobContent { get; set; }
///
/// 预计开始时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime ExpectBeginDt { get; set; }
///
/// 预计结束时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime ExpectEndDt { get; set; }
///
/// 实际开始时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime RealBeginDt { get; set; }
///
/// 实际结束时间
///
[SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
public DateTime RealEndDt { get; set; }
///
/// 异常状态0:正常,1:异常
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int Exception { get; set; }
public object Clone()
{
return this.MemberwiseClone();
}
public Grp_ScheduleDetailInfo DeepClone()
{
using (Stream objectStream = new MemoryStream())
{
IFormatter formatter = new BinaryFormatter();
formatter.Serialize(objectStream, this);
objectStream.Seek(0, SeekOrigin.Begin);
return formatter.Deserialize(objectStream) as Grp_ScheduleDetailInfo;
}
}
}
///
/// 团组流程管控人员配置
///
[SugarTable("Grp_SchedulePerson")]
public class Grp_SchedulePersonInfo : EntityBase
{
///
/// 流程Id
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int ScheduleId { get; set; }
///
/// 人员编号(SysUser.Id)
///
[SugarColumn(IsNullable = true, ColumnDataType = "int")]
public int SysUserId { get; set; }
///
/// 人员姓名
///
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
public string SysUserName { get; set; }
///
/// 负责工作
///
[SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
public string JobStr { get; set; }
}
}