addwechatfriendlog.go 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. // FieldTaskID holds the string denoting the task_id field in the database.
  26. FieldTaskID = "task_id"
  27. // FieldAddRequest holds the string denoting the add_request field in the database.
  28. FieldAddRequest = "add_request"
  29. // FieldAddResult holds the string denoting the add_result field in the database.
  30. FieldAddResult = "add_result"
  31. // FieldCreatedAt holds the string denoting the created_at field in the database.
  32. FieldCreatedAt = "created_at"
  33. // FieldUpdatedAt holds the string denoting the updated_at field in the database.
  34. FieldUpdatedAt = "updated_at"
  35. // Table holds the table name of the addwechatfriendlog in the database.
  36. Table = "add_wechat_friend_logs"
  37. )
  38. // Columns holds all SQL columns for addwechatfriendlog fields.
  39. var Columns = []string{
  40. FieldID,
  41. FieldOwnerWxID,
  42. FieldOwnerWxType,
  43. FieldFindContent,
  44. FieldMessage,
  45. FieldFindRequest,
  46. FieldFindResult,
  47. FieldIsCanAdd,
  48. FieldTaskID,
  49. FieldAddRequest,
  50. FieldAddResult,
  51. FieldCreatedAt,
  52. FieldUpdatedAt,
  53. }
  54. // ValidColumn reports if the column name is valid (part of the table columns).
  55. func ValidColumn(column string) bool {
  56. for i := range Columns {
  57. if column == Columns[i] {
  58. return true
  59. }
  60. }
  61. return false
  62. }
  63. var (
  64. // DefaultOwnerWxID holds the default value on creation for the "owner_wx_id" field.
  65. DefaultOwnerWxID string
  66. // OwnerWxIDValidator is a validator for the "owner_wx_id" field. It is called by the builders before save.
  67. OwnerWxIDValidator func(string) error
  68. // DefaultOwnerWxType holds the default value on creation for the "owner_wx_type" field.
  69. DefaultOwnerWxType int
  70. // DefaultFindContent holds the default value on creation for the "find_content" field.
  71. DefaultFindContent string
  72. // FindContentValidator is a validator for the "find_content" field. It is called by the builders before save.
  73. FindContentValidator func(string) error
  74. // DefaultMessage holds the default value on creation for the "message" field.
  75. DefaultMessage string
  76. // MessageValidator is a validator for the "message" field. It is called by the builders before save.
  77. MessageValidator func(string) error
  78. // DefaultIsCanAdd holds the default value on creation for the "is_can_add" field.
  79. DefaultIsCanAdd int
  80. // DefaultTaskID holds the default value on creation for the "task_id" field.
  81. DefaultTaskID int64
  82. // DefaultCreatedAt holds the default value on creation for the "created_at" field.
  83. DefaultCreatedAt func() int64
  84. // DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
  85. DefaultUpdatedAt func() int64
  86. // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
  87. UpdateDefaultUpdatedAt func() int64
  88. )
  89. // OrderOption defines the ordering options for the AddWechatFriendLog queries.
  90. type OrderOption func(*sql.Selector)
  91. // ByID orders the results by the id field.
  92. func ByID(opts ...sql.OrderTermOption) OrderOption {
  93. return sql.OrderByField(FieldID, opts...).ToFunc()
  94. }
  95. // ByOwnerWxID orders the results by the owner_wx_id field.
  96. func ByOwnerWxID(opts ...sql.OrderTermOption) OrderOption {
  97. return sql.OrderByField(FieldOwnerWxID, opts...).ToFunc()
  98. }
  99. // ByOwnerWxType orders the results by the owner_wx_type field.
  100. func ByOwnerWxType(opts ...sql.OrderTermOption) OrderOption {
  101. return sql.OrderByField(FieldOwnerWxType, opts...).ToFunc()
  102. }
  103. // ByFindContent orders the results by the find_content field.
  104. func ByFindContent(opts ...sql.OrderTermOption) OrderOption {
  105. return sql.OrderByField(FieldFindContent, opts...).ToFunc()
  106. }
  107. // ByMessage orders the results by the message field.
  108. func ByMessage(opts ...sql.OrderTermOption) OrderOption {
  109. return sql.OrderByField(FieldMessage, opts...).ToFunc()
  110. }
  111. // ByIsCanAdd orders the results by the is_can_add field.
  112. func ByIsCanAdd(opts ...sql.OrderTermOption) OrderOption {
  113. return sql.OrderByField(FieldIsCanAdd, opts...).ToFunc()
  114. }
  115. // ByTaskID orders the results by the task_id field.
  116. func ByTaskID(opts ...sql.OrderTermOption) OrderOption {
  117. return sql.OrderByField(FieldTaskID, opts...).ToFunc()
  118. }
  119. // ByCreatedAt orders the results by the created_at field.
  120. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
  121. return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
  122. }
  123. // ByUpdatedAt orders the results by the updated_at field.
  124. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
  125. return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
  126. }