addwechatfriendlog.go 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. // FieldSource holds the string denoting the source field in the database.
  38. FieldSource = "source"
  39. // FieldNickName holds the string denoting the nick_name field in the database.
  40. FieldNickName = "nick_name"
  41. // FieldAvatar holds the string denoting the avatar field in the database.
  42. FieldAvatar = "avatar"
  43. // FieldOrganizationID holds the string denoting the organization_id field in the database.
  44. FieldOrganizationID = "organization_id"
  45. // Table holds the table name of the addwechatfriendlog in the database.
  46. Table = "add_wechat_friend_log"
  47. )
  48. // Columns holds all SQL columns for addwechatfriendlog fields.
  49. var Columns = []string{
  50. FieldID,
  51. FieldOwnerWxID,
  52. FieldOwnerWxType,
  53. FieldFindContent,
  54. FieldMessage,
  55. FieldFindRequest,
  56. FieldFindResult,
  57. FieldIsCanAdd,
  58. FieldTaskCount,
  59. FieldTaskID,
  60. FieldAddRequest,
  61. FieldAddResult,
  62. FieldCreatedAt,
  63. FieldUpdatedAt,
  64. FieldSource,
  65. FieldNickName,
  66. FieldAvatar,
  67. FieldOrganizationID,
  68. }
  69. // ValidColumn reports if the column name is valid (part of the table columns).
  70. func ValidColumn(column string) bool {
  71. for i := range Columns {
  72. if column == Columns[i] {
  73. return true
  74. }
  75. }
  76. return false
  77. }
  78. var (
  79. // DefaultOwnerWxID holds the default value on creation for the "owner_wx_id" field.
  80. DefaultOwnerWxID string
  81. // OwnerWxIDValidator is a validator for the "owner_wx_id" field. It is called by the builders before save.
  82. OwnerWxIDValidator func(string) error
  83. // DefaultOwnerWxType holds the default value on creation for the "owner_wx_type" field.
  84. DefaultOwnerWxType int
  85. // DefaultFindContent holds the default value on creation for the "find_content" field.
  86. DefaultFindContent string
  87. // FindContentValidator is a validator for the "find_content" field. It is called by the builders before save.
  88. FindContentValidator func(string) error
  89. // DefaultMessage holds the default value on creation for the "message" field.
  90. DefaultMessage string
  91. // MessageValidator is a validator for the "message" field. It is called by the builders before save.
  92. MessageValidator func(string) error
  93. // DefaultIsCanAdd holds the default value on creation for the "is_can_add" field.
  94. DefaultIsCanAdd int
  95. // DefaultTaskCount holds the default value on creation for the "task_count" field.
  96. DefaultTaskCount int
  97. // DefaultTaskID holds the default value on creation for the "task_id" field.
  98. DefaultTaskID int64
  99. // DefaultCreatedAt holds the default value on creation for the "created_at" field.
  100. DefaultCreatedAt func() int64
  101. // DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
  102. DefaultUpdatedAt func() int64
  103. // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
  104. UpdateDefaultUpdatedAt func() int64
  105. // DefaultSource holds the default value on creation for the "source" field.
  106. DefaultSource int
  107. // DefaultNickName holds the default value on creation for the "nick_name" field.
  108. DefaultNickName string
  109. // NickNameValidator is a validator for the "nick_name" field. It is called by the builders before save.
  110. NickNameValidator func(string) error
  111. // DefaultAvatar holds the default value on creation for the "avatar" field.
  112. DefaultAvatar string
  113. // AvatarValidator is a validator for the "avatar" field. It is called by the builders before save.
  114. AvatarValidator func(string) error
  115. // DefaultOrganizationID holds the default value on creation for the "organization_id" field.
  116. DefaultOrganizationID int64
  117. )
  118. // OrderOption defines the ordering options for the AddWechatFriendLog queries.
  119. type OrderOption func(*sql.Selector)
  120. // ByID orders the results by the id field.
  121. func ByID(opts ...sql.OrderTermOption) OrderOption {
  122. return sql.OrderByField(FieldID, opts...).ToFunc()
  123. }
  124. // ByOwnerWxID orders the results by the owner_wx_id field.
  125. func ByOwnerWxID(opts ...sql.OrderTermOption) OrderOption {
  126. return sql.OrderByField(FieldOwnerWxID, opts...).ToFunc()
  127. }
  128. // ByOwnerWxType orders the results by the owner_wx_type field.
  129. func ByOwnerWxType(opts ...sql.OrderTermOption) OrderOption {
  130. return sql.OrderByField(FieldOwnerWxType, opts...).ToFunc()
  131. }
  132. // ByFindContent orders the results by the find_content field.
  133. func ByFindContent(opts ...sql.OrderTermOption) OrderOption {
  134. return sql.OrderByField(FieldFindContent, opts...).ToFunc()
  135. }
  136. // ByMessage orders the results by the message field.
  137. func ByMessage(opts ...sql.OrderTermOption) OrderOption {
  138. return sql.OrderByField(FieldMessage, opts...).ToFunc()
  139. }
  140. // ByIsCanAdd orders the results by the is_can_add field.
  141. func ByIsCanAdd(opts ...sql.OrderTermOption) OrderOption {
  142. return sql.OrderByField(FieldIsCanAdd, opts...).ToFunc()
  143. }
  144. // ByTaskCount orders the results by the task_count field.
  145. func ByTaskCount(opts ...sql.OrderTermOption) OrderOption {
  146. return sql.OrderByField(FieldTaskCount, opts...).ToFunc()
  147. }
  148. // ByTaskID orders the results by the task_id field.
  149. func ByTaskID(opts ...sql.OrderTermOption) OrderOption {
  150. return sql.OrderByField(FieldTaskID, opts...).ToFunc()
  151. }
  152. // ByCreatedAt orders the results by the created_at field.
  153. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
  154. return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
  155. }
  156. // ByUpdatedAt orders the results by the updated_at field.
  157. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
  158. return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
  159. }
  160. // BySource orders the results by the source field.
  161. func BySource(opts ...sql.OrderTermOption) OrderOption {
  162. return sql.OrderByField(FieldSource, opts...).ToFunc()
  163. }
  164. // ByNickName orders the results by the nick_name field.
  165. func ByNickName(opts ...sql.OrderTermOption) OrderOption {
  166. return sql.OrderByField(FieldNickName, opts...).ToFunc()
  167. }
  168. // ByAvatar orders the results by the avatar field.
  169. func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
  170. return sql.OrderByField(FieldAvatar, opts...).ToFunc()
  171. }
  172. // ByOrganizationID orders the results by the organization_id field.
  173. func ByOrganizationID(opts ...sql.OrderTermOption) OrderOption {
  174. return sql.OrderByField(FieldOrganizationID, opts...).ToFunc()
  175. }