using Cksoft.Unity; using System; using System.Collections.Generic; using System.Text; namespace DllEapEntity { [Table("StaffMachine")] public class StaffMachine : BaseEntity { ////自动产生代码开始&&此行不能删除 #region 自动产生代码 public StaffMachine() { base.EntityStatusID = 1; } [Key] [Identity] public int ID { get; set; } [ColDetail(10000, "员工工号", 0, 1, 100, 1, "a.StaffCode", "editStaffCode", 1, 2)] public string StaffCode { get; set; } [ColDetail(10010, "机台ID", 1, 0, 100, 1, "a.MacId", "editMacId", 1, 1)] public int MacId { get; set; } [ColDetail(10020, "录入时间", 1, 0, 100, 1, "a.RecCode", "editRecCode", 1, 1)] public string RecCode { get; set; } [ColDetail(10030, "录入人", 0, 0, 100, 1, "a.RecTime", "editRecTime", 1, 2)] public DateTime RecTime { get; set; } [ColDetail(10040, "修改人", 1, 1, 100, 1, "a.ModCode", "", 1, 1)] public string ModCode { get; set; } [ColDetail(10050, "修改时间", 1, 1, 100, 1, "a.ModTime", "", 1, 1)] public DateTime ModTime { get; set; } [ColDetail(10060, "机台编号", 1, 1, 100, 1, "b.FCode", "", 1, 1)] public string MacCode { get; set; } public override string GetSelectSql() { return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}"); } public override string GetQueryColSql() { string sqlstr = "a.ID,a.StaffCode,a.MacId,a.RecCode,a.RecTime,a.ModCode,a.ModTime," + "b.FCode MacCode," + "0 EntityStatusID"; return sqlstr; } public override string GetQueryTabSql() { string sqlstr = " StaffMachine a " + " inner join Machine b on a.MacId=b.id "; return sqlstr; } public override string GetQuerySortSql() { return " "; } #endregion ////自动产生代码结束&&此行不能删除 } }