StatusInfo.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Cksoft.Unity;
  2. using System;
  3. namespace DllEapEntity.RA
  4. {
  5. [Table("statusinfo")]
  6. public class StatusInfo:BaseEntity
  7. {
  8. ////自动产生代码开始&&此行不能删除
  9. #region 自动产生代码
  10. public StatusInfo()
  11. {
  12. base.EntityStatusID = 1;
  13. }
  14. [ColDetail(10,"ID",1,1,100,1,"a.ID","",1,1)]
  15. [Key]
  16. [Identity]
  17. public int ID { get; set; }
  18. [ColDetail(20,"machine主键",1,1,100,1,"a.MacID","",1,1)]
  19. public int MacID { get; set; }
  20. [ColDetail(30,"状态 0=停机,1=运转,2=预约",1,1,100,1,"a.Status","",1,1)]
  21. public string Status { get; set; }
  22. [ColDetail(40,"开始时间",1,1,100,1,"a.StartTime","",1,1)]
  23. public DateTime StartTime { get; set; }
  24. [ColDetail(50,"结束时间",1,1,100,1,"a.EndTime","",1,1)]
  25. public DateTime EndTime { get; set; }
  26. [ColDetail(60,"创建人信息",1,1,100,1,"a.RecCode","",1,1)]
  27. public string RecCode { get; set; }
  28. [ColDetail(70,"创建时间",1,1,100,1,"a.RecTime","",1,1)]
  29. public DateTime RecTime { get; set; }
  30. [ColDetail(80,"修改人信息",1,1,100,1,"a.ModeCode","",1,1)]
  31. public string ModeCode { get; set; }
  32. [ColDetail(90,"修改时间",1,1,100,1,"a.ModeTime","",1,1)]
  33. public DateTime ModeTime { get; set; }
  34. [ColDetail(100,"状态持续时间(小时)",1,1,100,1,"a.Duration","",1,1)]
  35. public string Duration { get; set; }
  36. public override string GetSelectSql()
  37. {
  38. return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}");
  39. }
  40. public override string GetQueryColSql()
  41. {
  42. string sqlstr = "a.ID ID,a.MacID MacID,a.Status Status,a.StartTime StartTime,a.EndTime EndTime,a.RecCode RecCode,a.RecTime RecTime,a.ModeCode ModeCode";
  43. sqlstr += ",a.ModeTime ModeTime,a.Duration Duration,0 EntityStatusID";
  44. return sqlstr;
  45. }
  46. public override string GetQueryTabSql()
  47. {
  48. string sqlstr=" statusinfo a ";
  49. return sqlstr;
  50. }
  51. public override string GetQuerySortSql()
  52. {
  53. return "";
  54. }
  55. #endregion
  56. ////自动产生代码结束&&此行不能删除
  57. }
  58. }