addwechatfriendlog.go 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. // Code generated by ent, DO NOT EDIT.
  2. package addwechatfriendlog
  3. import (
  4. "entgo.io/ent/dialect/sql"
  5. )
  6. const (
  7. // Label holds the string label denoting the addwechatfriendlog type in the database.
  8. Label = "add_wechat_friend_log"
  9. // FieldID holds the string denoting the id field in the database.
  10. FieldID = "id"
  11. // FieldOwnerWxID holds the string denoting the owner_wx_id field in the database.
  12. FieldOwnerWxID = "owner_wx_id"
  13. // FieldOwnerWxType holds the string denoting the owner_wx_type field in the database.
  14. FieldOwnerWxType = "owner_wx_type"
  15. // FieldFindContent holds the string denoting the find_content field in the database.
  16. FieldFindContent = "find_content"
  17. // FieldMessage holds the string denoting the message field in the database.
  18. FieldMessage = "message"
  19. // FieldFindRequest holds the string denoting the find_request field in the database.
  20. FieldFindRequest = "find_request"
  21. // FieldFindResult holds the string denoting the find_result field in the database.
  22. FieldFindResult = "find_result"
  23. // FieldIsCanAdd holds the string denoting the is_can_add field in the database.
  24. FieldIsCanAdd = "is_can_add"
  25. // FieldTaskCount holds the string denoting the task_count field in the database.
  26. FieldTaskCount = "task_count"
  27. // FieldTaskID holds the string denoting the task_id field in the database.
  28. FieldTaskID = "task_id"
  29. // FieldAddRequest holds the string denoting the add_request field in the database.
  30. FieldAddRequest = "add_request"
  31. // FieldAddResult holds the string denoting the add_result field in the database.
  32. FieldAddResult = "add_result"
  33. // FieldCreatedAt holds the string denoting the created_at field in the database.
  34. FieldCreatedAt = "created_at"
  35. // FieldUpdatedAt holds the string denoting the updated_at field in the database.
  36. FieldUpdatedAt = "updated_at"
  37. // Table holds the table name of the addwechatfriendlog in the database.
  38. Table = "add_wechat_friend_log"
  39. )
  40. // Columns holds all SQL columns for addwechatfriendlog fields.
  41. var Columns = []string{
  42. FieldID,
  43. FieldOwnerWxID,
  44. FieldOwnerWxType,
  45. FieldFindContent,
  46. FieldMessage,
  47. FieldFindRequest,
  48. FieldFindResult,
  49. FieldIsCanAdd,
  50. FieldTaskCount,
  51. FieldTaskID,
  52. FieldAddRequest,
  53. FieldAddResult,
  54. FieldCreatedAt,
  55. FieldUpdatedAt,
  56. }
  57. // ValidColumn reports if the column name is valid (part of the table columns).
  58. func ValidColumn(column string) bool {
  59. for i := range Columns {
  60. if column == Columns[i] {
  61. return true
  62. }
  63. }
  64. return false
  65. }
  66. var (
  67. // DefaultOwnerWxID holds the default value on creation for the "owner_wx_id" field.
  68. DefaultOwnerWxID string
  69. // OwnerWxIDValidator is a validator for the "owner_wx_id" field. It is called by the builders before save.
  70. OwnerWxIDValidator func(string) error
  71. // DefaultOwnerWxType holds the default value on creation for the "owner_wx_type" field.
  72. DefaultOwnerWxType int
  73. // DefaultFindContent holds the default value on creation for the "find_content" field.
  74. DefaultFindContent string
  75. // FindContentValidator is a validator for the "find_content" field. It is called by the builders before save.
  76. FindContentValidator func(string) error
  77. // DefaultMessage holds the default value on creation for the "message" field.
  78. DefaultMessage string
  79. // MessageValidator is a validator for the "message" field. It is called by the builders before save.
  80. MessageValidator func(string) error
  81. // DefaultIsCanAdd holds the default value on creation for the "is_can_add" field.
  82. DefaultIsCanAdd int
  83. // DefaultTaskCount holds the default value on creation for the "task_count" field.
  84. DefaultTaskCount int
  85. // DefaultTaskID holds the default value on creation for the "task_id" field.
  86. DefaultTaskID int64
  87. // DefaultCreatedAt holds the default value on creation for the "created_at" field.
  88. DefaultCreatedAt func() int64
  89. // DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
  90. DefaultUpdatedAt func() int64
  91. // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
  92. UpdateDefaultUpdatedAt func() int64
  93. )
  94. // OrderOption defines the ordering options for the AddWechatFriendLog queries.
  95. type OrderOption func(*sql.Selector)
  96. // ByID orders the results by the id field.
  97. func ByID(opts ...sql.OrderTermOption) OrderOption {
  98. return sql.OrderByField(FieldID, opts...).ToFunc()
  99. }
  100. // ByOwnerWxID orders the results by the owner_wx_id field.
  101. func ByOwnerWxID(opts ...sql.OrderTermOption) OrderOption {
  102. return sql.OrderByField(FieldOwnerWxID, opts...).ToFunc()
  103. }
  104. // ByOwnerWxType orders the results by the owner_wx_type field.
  105. func ByOwnerWxType(opts ...sql.OrderTermOption) OrderOption {
  106. return sql.OrderByField(FieldOwnerWxType, opts...).ToFunc()
  107. }
  108. // ByFindContent orders the results by the find_content field.
  109. func ByFindContent(opts ...sql.OrderTermOption) OrderOption {
  110. return sql.OrderByField(FieldFindContent, opts...).ToFunc()
  111. }
  112. // ByMessage orders the results by the message field.
  113. func ByMessage(opts ...sql.OrderTermOption) OrderOption {
  114. return sql.OrderByField(FieldMessage, opts...).ToFunc()
  115. }
  116. // ByIsCanAdd orders the results by the is_can_add field.
  117. func ByIsCanAdd(opts ...sql.OrderTermOption) OrderOption {
  118. return sql.OrderByField(FieldIsCanAdd, opts...).ToFunc()
  119. }
  120. // ByTaskCount orders the results by the task_count field.
  121. func ByTaskCount(opts ...sql.OrderTermOption) OrderOption {
  122. return sql.OrderByField(FieldTaskCount, opts...).ToFunc()
  123. }
  124. // ByTaskID orders the results by the task_id field.
  125. func ByTaskID(opts ...sql.OrderTermOption) OrderOption {
  126. return sql.OrderByField(FieldTaskID, opts...).ToFunc()
  127. }
  128. // ByCreatedAt orders the results by the created_at field.
  129. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
  130. return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
  131. }
  132. // ByUpdatedAt orders the results by the updated_at field.
  133. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
  134. return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
  135. }