MacModel.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using Cksoft.Unity;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. namespace DllEapEntity
  6. {
  7. [Table("MacModel")]
  8. public class MacModel : BaseEntity
  9. {
  10. ////自动产生代码开始&&此行不能删除
  11. #region 自动产生代码
  12. public MacModel()
  13. {
  14. base.EntityStatusID = 1;
  15. }
  16. [ColDetail(20, "代码", 1, 1, 80, 1, "a.FCode", "editFCode", 1, 1)]
  17. public string FCode { get; set; }
  18. [ColDetail(30, "名称", 1, 1, 100, 1, "a.FName", "editFName", 1, 1)]
  19. public string FName { get; set; }
  20. [ColDetail(40, "备注", 1, 1, 200, 1, "a.Remark", "editRemark", 1, 1)]
  21. public string Remark { get; set; }
  22. [ColDetail(50, "录入人代码", 1, 1, 100, 1, "a.RecCode", "editRecCode", 1, 1)]
  23. public string RecCode { get; set; }
  24. [ColDetail(60, "录入日期", 1, 1, 100, 1, "a.RecTime", "editRecTime", 1, 1)]
  25. public DateTime RecTime { get; set; }
  26. [ColDetail(70, "修改人代码", 1, 1, 100, 1, "a.ModCode", "editModCode", 1, 1)]
  27. public string ModCode { get; set; }
  28. [ColDetail(80, "修改时间", 1, 1, 100, 1, "a.ModTime", "editModTime", 1, 1)]
  29. public DateTime ModTime { get; set; }
  30. [ColDetail(90, "录入人", 1, 0, 100, 1, "b.FName", "editRecName", 1, 1)]
  31. public string RecName { get; set; }
  32. [ColDetail(100, "修改人", 1, 0, 100, 1, "c.FName", "editModName", 1, 1)]
  33. public string ModName { get; set; }
  34. [ColDetail(10000, "ID", 1, 1, 100, 1, "a.ID", "editID", 1, 1)]
  35. [Key]
  36. [Identity]
  37. public int ID { get; set; }
  38. [ColDetail(10010, "软件版本", 1, 1, 100, 1, "a.SoftVersion", "editSoftVersion", 1, 1)]
  39. public string SoftVersion { get; set; }
  40. [ColDetail(10020, "厂商ID", 1, 1, 100, 1, "a.SupplierID", "editSupplierFCode", 1, 2)]
  41. public int SupplierID { get; set; }
  42. [ColDetail(10030, "厂商代码", 1, 0, 100, 1, "d.FCode", "editSupplierFCode", 1, 1)]
  43. public string SupplierFCode { get; set; }
  44. [ColDetail(10040, "ProRootPath", 1, 1, 100, 1, "a.ProRootPath", "", 1, 1)]
  45. public string ProRootPath { get; set; }
  46. public override string GetSelectSql()
  47. {
  48. return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}");
  49. }
  50. public override string GetQueryColSql()
  51. {
  52. string sqlstr = "a.FCode FCode,a.FName FName,a.Remark Remark,a.RecCode RecCode,a.RecTime RecTime,a.ModCode ModCode,a.ModTime ModTime,b.FName RecName";
  53. sqlstr += ",c.FName ModName,a.ID ID,a.SoftVersion SoftVersion,a.SupplierID SupplierID,d.FCode SupplierFCode,a.ProRootPath ProRootPath,0 EntityStatusID";
  54. return sqlstr;
  55. }
  56. public override string GetQueryTabSql()
  57. {
  58. string sqlstr = " MacModel a ";
  59. sqlstr += " left outer join staff b on a.RecCode =b.FCode";
  60. sqlstr += " left outer join staff c on a.ModCode =c.FCode";
  61. sqlstr += " left outer join supplier d on a.SupplierID =d.id";
  62. return sqlstr;
  63. }
  64. public override string GetQuerySortSql()
  65. {
  66. return " ";
  67. }
  68. #endregion
  69. ////自动产生代码结束&&此行不能删除
  70. ///
  71. public string TPCode { get; set; }
  72. public IEnumerable<MMSecDetail> MMSecDetails { get; set; }
  73. }
  74. }