using Cksoft.Unity; using System; namespace DllEapEntity { [Table("machinetestmarking")] public class MachineTestMarking : BaseEntity { ////自动产生代码开始&&此行不能删除 #region 自动产生代码 public MachineTestMarking() { base.EntityStatusID = 1; } [ColDetail(10, "ID", 1, 1, 100, 1, "a.ID", "", 1, 1)] [Key] [Identity] public int ID { get; set; } [ColDetail(20, "macID", 1, 1, 100, 1, "a.macID", "", 1, 1)] public int macID { get; set; } [ColDetail(30, "parentID", 1, 1, 100, 1, "a.parentID", "", 1, 1)] public int parentID { get; set; } [ColDetail(40, "录入人代码", 1, 1, 100, 1, "a.RecCode", "", 1, 1)] public string RecCode { get; set; } [ColDetail(50, "录入日期", 1, 1, 100, 1, "a.RecTime", "", 1, 1)] public DateTime RecTime { get; set; } [ColDetail(60, "修改 人代码", 1, 1, 100, 1, "a.ModCode", "", 1, 1)] public string ModCode { get; set; } [ColDetail(70, "修改时间", 1, 1, 100, 1, "a.ModTime", "", 1, 1)] public DateTime ModTime { get; set; } [ColDetail(80, "代码", 1, 0, 100, 1, "b.FCode", "", 1, 1)] public string FCode { get; set; } [ColDetail(90, "名称", 1, 0, 100, 1, "b.FName", "", 1, 1)] public string FName { get; set; } [ColDetail(100, "代码", 1, 0, 100, 1, "d.FCode", "", 1, 1)] public string ParentFCode { get; set; } [ColDetail(110, "名称", 1, 0, 100, 1, "d.FName", "", 1, 1)] public string ParentFName { get; set; } [ColDetail(120, "程序名", 1, 1, 100, 1, "a.programName", "", 1, 1)] public string programName { get; set; } [ColDetail(130, "MModeID", 1, 0, 100, 1, "f.ID", "", 1, 1)] public int MModeID { get; set; } [ColDetail(140, "员工工号", 1, 1, 100, 1, "a.employNum", "", 1, 1)] public string employNum { get; set; } [ColDetail(150, "qt站别", 1, 1, 100, 1, "a.qtype", "", 1, 1)] public string qtype { get; set; } public override string GetSelectSql() { return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}"); } public override string GetQueryColSql() { string sqlstr = "a.ID ID,a.macID macID,a.parentID parentID,a.RecCode RecCode,a.RecTime RecTime,a.ModCode ModCode,a.ModTime ModTime,b.FCode FCode,b.FName FName"; sqlstr += ",d.FCode ParentFCode,d.FName ParentFName,a.programName programName,f.ID MModeID,a.employNum employNum,a.qtype qtype,0 EntityStatusID"; return sqlstr; } public override string GetQueryTabSql() { string sqlstr = " machinetestmarking a "; sqlstr += " left outer join machine b on a.macID =b.id"; sqlstr += " left outer join macmodel c on b.MModeID =c.id"; sqlstr += " left outer join machine d on a.parentID =d.id"; sqlstr += " left outer join macmodel f on f.id =d.MModeID"; return sqlstr; } public override string GetQuerySortSql() { return ""; } #endregion ////自动产生代码结束&&此行不能删除 } }