FCSSysAttribute.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. namespace FCS.Models
  3. {
  4. /// <summary>
  5. /// 彩种表名称特性
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
  8. public sealed class TableNameAttribute : Attribute
  9. {
  10. private string _tablename;
  11. public string TableName { get { return _tablename; } }
  12. /// <summary>
  13. /// 构造函数
  14. /// </summary>
  15. /// <param name="TableName">表名称</param>
  16. public TableNameAttribute(string TableName)
  17. {
  18. this._tablename = TableName;
  19. }
  20. }
  21. /// <summary>
  22. /// 彩种编码特性
  23. /// </summary>
  24. [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
  25. public sealed class LotteryCodeAttribute : Attribute
  26. {
  27. private string _code;
  28. public string Code { get { return _code; } }
  29. /// <summary>
  30. /// 构造函数
  31. /// </summary>
  32. /// <param name="TableName">表名称</param>
  33. public LotteryCodeAttribute(string Code)
  34. {
  35. this._code = Code;
  36. }
  37. }
  38. public sealed class TableAttribute : Attribute
  39. {
  40. public string Name { get; set; }
  41. /// <summary>
  42. /// 构造函数
  43. /// </summary>
  44. /// <param name="TableName">表名称</param>
  45. public TableAttribute(string Name)
  46. {
  47. this.Name = Name;
  48. }
  49. }
  50. }