wpchatroommember.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // Code generated by ent, DO NOT EDIT.
  2. package wpchatroommember
  3. import (
  4. "time"
  5. "entgo.io/ent/dialect/sql"
  6. )
  7. const (
  8. // Label holds the string label denoting the wpchatroommember type in the database.
  9. Label = "wp_chatroom_member"
  10. // FieldID holds the string denoting the id field in the database.
  11. FieldID = "id"
  12. // FieldCreatedAt holds the string denoting the created_at field in the database.
  13. FieldCreatedAt = "created_at"
  14. // FieldUpdatedAt holds the string denoting the updated_at field in the database.
  15. FieldUpdatedAt = "updated_at"
  16. // FieldStatus holds the string denoting the status field in the database.
  17. FieldStatus = "status"
  18. // FieldWxWxid holds the string denoting the wx_wxid field in the database.
  19. FieldWxWxid = "wx_wxid"
  20. // FieldWxid holds the string denoting the wxid field in the database.
  21. FieldWxid = "wxid"
  22. // FieldNickname holds the string denoting the nickname field in the database.
  23. FieldNickname = "nickname"
  24. // FieldAvatar holds the string denoting the avatar field in the database.
  25. FieldAvatar = "avatar"
  26. // Table holds the table name of the wpchatroommember in the database.
  27. Table = "wp_chatroom_member"
  28. )
  29. // Columns holds all SQL columns for wpchatroommember fields.
  30. var Columns = []string{
  31. FieldID,
  32. FieldCreatedAt,
  33. FieldUpdatedAt,
  34. FieldStatus,
  35. FieldWxWxid,
  36. FieldWxid,
  37. FieldNickname,
  38. FieldAvatar,
  39. }
  40. // ValidColumn reports if the column name is valid (part of the table columns).
  41. func ValidColumn(column string) bool {
  42. for i := range Columns {
  43. if column == Columns[i] {
  44. return true
  45. }
  46. }
  47. return false
  48. }
  49. var (
  50. // DefaultCreatedAt holds the default value on creation for the "created_at" field.
  51. DefaultCreatedAt func() time.Time
  52. // DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
  53. DefaultUpdatedAt func() time.Time
  54. // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
  55. UpdateDefaultUpdatedAt func() time.Time
  56. // DefaultStatus holds the default value on creation for the "status" field.
  57. DefaultStatus uint8
  58. // DefaultWxWxid holds the default value on creation for the "wx_wxid" field.
  59. DefaultWxWxid string
  60. // DefaultWxid holds the default value on creation for the "wxid" field.
  61. DefaultWxid string
  62. // DefaultNickname holds the default value on creation for the "nickname" field.
  63. DefaultNickname string
  64. // DefaultAvatar holds the default value on creation for the "avatar" field.
  65. DefaultAvatar string
  66. )
  67. // OrderOption defines the ordering options for the WpChatroomMember queries.
  68. type OrderOption func(*sql.Selector)
  69. // ByID orders the results by the id field.
  70. func ByID(opts ...sql.OrderTermOption) OrderOption {
  71. return sql.OrderByField(FieldID, opts...).ToFunc()
  72. }
  73. // ByCreatedAt orders the results by the created_at field.
  74. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
  75. return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
  76. }
  77. // ByUpdatedAt orders the results by the updated_at field.
  78. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
  79. return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
  80. }
  81. // ByStatus orders the results by the status field.
  82. func ByStatus(opts ...sql.OrderTermOption) OrderOption {
  83. return sql.OrderByField(FieldStatus, opts...).ToFunc()
  84. }
  85. // ByWxWxid orders the results by the wx_wxid field.
  86. func ByWxWxid(opts ...sql.OrderTermOption) OrderOption {
  87. return sql.OrderByField(FieldWxWxid, opts...).ToFunc()
  88. }
  89. // ByWxid orders the results by the wxid field.
  90. func ByWxid(opts ...sql.OrderTermOption) OrderOption {
  91. return sql.OrderByField(FieldWxid, opts...).ToFunc()
  92. }
  93. // ByNickname orders the results by the nickname field.
  94. func ByNickname(opts ...sql.OrderTermOption) OrderOption {
  95. return sql.OrderByField(FieldNickname, opts...).ToFunc()
  96. }
  97. // ByAvatar orders the results by the avatar field.
  98. func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
  99. return sql.OrderByField(FieldAvatar, opts...).ToFunc()
  100. }