account.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. // Code generated by ent, DO NOT EDIT.
  2. package account
  3. import (
  4. "fmt"
  5. "time"
  6. "entgo.io/ent"
  7. "entgo.io/ent/dialect/sql"
  8. "entgo.io/ent/dialect/sql/sqlgraph"
  9. )
  10. const (
  11. // Label holds the string label denoting the account type in the database.
  12. Label = "account"
  13. // FieldID holds the string denoting the id field in the database.
  14. FieldID = "id"
  15. // FieldCreatedAt holds the string denoting the created_at field in the database.
  16. FieldCreatedAt = "created_at"
  17. // FieldUpdatedAt holds the string denoting the updated_at field in the database.
  18. FieldUpdatedAt = "updated_at"
  19. // FieldDeletedAt holds the string denoting the deleted_at field in the database.
  20. FieldDeletedAt = "deleted_at"
  21. // FieldName holds the string denoting the name field in the database.
  22. FieldName = "name"
  23. // FieldNotes holds the string denoting the notes field in the database.
  24. FieldNotes = "notes"
  25. // FieldPlatform holds the string denoting the platform field in the database.
  26. FieldPlatform = "platform"
  27. // FieldType holds the string denoting the type field in the database.
  28. FieldType = "type"
  29. // FieldCredentials holds the string denoting the credentials field in the database.
  30. FieldCredentials = "credentials"
  31. // FieldExtra holds the string denoting the extra field in the database.
  32. FieldExtra = "extra"
  33. // FieldProxyID holds the string denoting the proxy_id field in the database.
  34. FieldProxyID = "proxy_id"
  35. // FieldProxyFallbackOriginID holds the string denoting the proxy_fallback_origin_id field in the database.
  36. FieldProxyFallbackOriginID = "proxy_fallback_origin_id"
  37. // FieldConcurrency holds the string denoting the concurrency field in the database.
  38. FieldConcurrency = "concurrency"
  39. // FieldLoadFactor holds the string denoting the load_factor field in the database.
  40. FieldLoadFactor = "load_factor"
  41. // FieldPriority holds the string denoting the priority field in the database.
  42. FieldPriority = "priority"
  43. // FieldRateMultiplier holds the string denoting the rate_multiplier field in the database.
  44. FieldRateMultiplier = "rate_multiplier"
  45. // FieldStatus holds the string denoting the status field in the database.
  46. FieldStatus = "status"
  47. // FieldErrorMessage holds the string denoting the error_message field in the database.
  48. FieldErrorMessage = "error_message"
  49. // FieldLastUsedAt holds the string denoting the last_used_at field in the database.
  50. FieldLastUsedAt = "last_used_at"
  51. // FieldExpiresAt holds the string denoting the expires_at field in the database.
  52. FieldExpiresAt = "expires_at"
  53. // FieldAutoPauseOnExpired holds the string denoting the auto_pause_on_expired field in the database.
  54. FieldAutoPauseOnExpired = "auto_pause_on_expired"
  55. // FieldSchedulable holds the string denoting the schedulable field in the database.
  56. FieldSchedulable = "schedulable"
  57. // FieldRateLimitedAt holds the string denoting the rate_limited_at field in the database.
  58. FieldRateLimitedAt = "rate_limited_at"
  59. // FieldRateLimitResetAt holds the string denoting the rate_limit_reset_at field in the database.
  60. FieldRateLimitResetAt = "rate_limit_reset_at"
  61. // FieldOverloadUntil holds the string denoting the overload_until field in the database.
  62. FieldOverloadUntil = "overload_until"
  63. // FieldTempUnschedulableUntil holds the string denoting the temp_unschedulable_until field in the database.
  64. FieldTempUnschedulableUntil = "temp_unschedulable_until"
  65. // FieldTempUnschedulableReason holds the string denoting the temp_unschedulable_reason field in the database.
  66. FieldTempUnschedulableReason = "temp_unschedulable_reason"
  67. // FieldSessionWindowStart holds the string denoting the session_window_start field in the database.
  68. FieldSessionWindowStart = "session_window_start"
  69. // FieldSessionWindowEnd holds the string denoting the session_window_end field in the database.
  70. FieldSessionWindowEnd = "session_window_end"
  71. // FieldSessionWindowStatus holds the string denoting the session_window_status field in the database.
  72. FieldSessionWindowStatus = "session_window_status"
  73. // FieldParentAccountID holds the string denoting the parent_account_id field in the database.
  74. FieldParentAccountID = "parent_account_id"
  75. // FieldQuotaDimension holds the string denoting the quota_dimension field in the database.
  76. FieldQuotaDimension = "quota_dimension"
  77. // EdgeGroups holds the string denoting the groups edge name in mutations.
  78. EdgeGroups = "groups"
  79. // EdgeProxy holds the string denoting the proxy edge name in mutations.
  80. EdgeProxy = "proxy"
  81. // EdgeParent holds the string denoting the parent edge name in mutations.
  82. EdgeParent = "parent"
  83. // EdgeChildren holds the string denoting the children edge name in mutations.
  84. EdgeChildren = "children"
  85. // EdgeUsageLogs holds the string denoting the usage_logs edge name in mutations.
  86. EdgeUsageLogs = "usage_logs"
  87. // EdgeAccountGroups holds the string denoting the account_groups edge name in mutations.
  88. EdgeAccountGroups = "account_groups"
  89. // Table holds the table name of the account in the database.
  90. Table = "accounts"
  91. // GroupsTable is the table that holds the groups relation/edge. The primary key declared below.
  92. GroupsTable = "account_groups"
  93. // GroupsInverseTable is the table name for the Group entity.
  94. // It exists in this package in order to avoid circular dependency with the "group" package.
  95. GroupsInverseTable = "groups"
  96. // ProxyTable is the table that holds the proxy relation/edge.
  97. ProxyTable = "accounts"
  98. // ProxyInverseTable is the table name for the Proxy entity.
  99. // It exists in this package in order to avoid circular dependency with the "proxy" package.
  100. ProxyInverseTable = "proxies"
  101. // ProxyColumn is the table column denoting the proxy relation/edge.
  102. ProxyColumn = "proxy_id"
  103. // ParentTable is the table that holds the parent relation/edge.
  104. ParentTable = "accounts"
  105. // ParentColumn is the table column denoting the parent relation/edge.
  106. ParentColumn = "parent_account_id"
  107. // ChildrenTable is the table that holds the children relation/edge.
  108. ChildrenTable = "accounts"
  109. // ChildrenColumn is the table column denoting the children relation/edge.
  110. ChildrenColumn = "parent_account_id"
  111. // UsageLogsTable is the table that holds the usage_logs relation/edge.
  112. UsageLogsTable = "usage_logs"
  113. // UsageLogsInverseTable is the table name for the UsageLog entity.
  114. // It exists in this package in order to avoid circular dependency with the "usagelog" package.
  115. UsageLogsInverseTable = "usage_logs"
  116. // UsageLogsColumn is the table column denoting the usage_logs relation/edge.
  117. UsageLogsColumn = "account_id"
  118. // AccountGroupsTable is the table that holds the account_groups relation/edge.
  119. AccountGroupsTable = "account_groups"
  120. // AccountGroupsInverseTable is the table name for the AccountGroup entity.
  121. // It exists in this package in order to avoid circular dependency with the "accountgroup" package.
  122. AccountGroupsInverseTable = "account_groups"
  123. // AccountGroupsColumn is the table column denoting the account_groups relation/edge.
  124. AccountGroupsColumn = "account_id"
  125. )
  126. // Columns holds all SQL columns for account fields.
  127. var Columns = []string{
  128. FieldID,
  129. FieldCreatedAt,
  130. FieldUpdatedAt,
  131. FieldDeletedAt,
  132. FieldName,
  133. FieldNotes,
  134. FieldPlatform,
  135. FieldType,
  136. FieldCredentials,
  137. FieldExtra,
  138. FieldProxyID,
  139. FieldProxyFallbackOriginID,
  140. FieldConcurrency,
  141. FieldLoadFactor,
  142. FieldPriority,
  143. FieldRateMultiplier,
  144. FieldStatus,
  145. FieldErrorMessage,
  146. FieldLastUsedAt,
  147. FieldExpiresAt,
  148. FieldAutoPauseOnExpired,
  149. FieldSchedulable,
  150. FieldRateLimitedAt,
  151. FieldRateLimitResetAt,
  152. FieldOverloadUntil,
  153. FieldTempUnschedulableUntil,
  154. FieldTempUnschedulableReason,
  155. FieldSessionWindowStart,
  156. FieldSessionWindowEnd,
  157. FieldSessionWindowStatus,
  158. FieldParentAccountID,
  159. FieldQuotaDimension,
  160. }
  161. var (
  162. // GroupsPrimaryKey and GroupsColumn2 are the table columns denoting the
  163. // primary key for the groups relation (M2M).
  164. GroupsPrimaryKey = []string{"account_id", "group_id"}
  165. )
  166. // ValidColumn reports if the column name is valid (part of the table columns).
  167. func ValidColumn(column string) bool {
  168. for i := range Columns {
  169. if column == Columns[i] {
  170. return true
  171. }
  172. }
  173. return false
  174. }
  175. // Note that the variables below are initialized by the runtime
  176. // package on the initialization of the application. Therefore,
  177. // it should be imported in the main as follows:
  178. //
  179. // import _ "github.com/Wei-Shaw/sub2api/ent/runtime"
  180. var (
  181. Hooks [1]ent.Hook
  182. Interceptors [1]ent.Interceptor
  183. // DefaultCreatedAt holds the default value on creation for the "created_at" field.
  184. DefaultCreatedAt func() time.Time
  185. // DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
  186. DefaultUpdatedAt func() time.Time
  187. // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
  188. UpdateDefaultUpdatedAt func() time.Time
  189. // NameValidator is a validator for the "name" field. It is called by the builders before save.
  190. NameValidator func(string) error
  191. // PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
  192. PlatformValidator func(string) error
  193. // TypeValidator is a validator for the "type" field. It is called by the builders before save.
  194. TypeValidator func(string) error
  195. // DefaultCredentials holds the default value on creation for the "credentials" field.
  196. DefaultCredentials func() map[string]interface{}
  197. // DefaultExtra holds the default value on creation for the "extra" field.
  198. DefaultExtra func() map[string]interface{}
  199. // DefaultConcurrency holds the default value on creation for the "concurrency" field.
  200. DefaultConcurrency int
  201. // DefaultPriority holds the default value on creation for the "priority" field.
  202. DefaultPriority int
  203. // DefaultRateMultiplier holds the default value on creation for the "rate_multiplier" field.
  204. DefaultRateMultiplier float64
  205. // DefaultStatus holds the default value on creation for the "status" field.
  206. DefaultStatus string
  207. // StatusValidator is a validator for the "status" field. It is called by the builders before save.
  208. StatusValidator func(string) error
  209. // DefaultAutoPauseOnExpired holds the default value on creation for the "auto_pause_on_expired" field.
  210. DefaultAutoPauseOnExpired bool
  211. // DefaultSchedulable holds the default value on creation for the "schedulable" field.
  212. DefaultSchedulable bool
  213. // SessionWindowStatusValidator is a validator for the "session_window_status" field. It is called by the builders before save.
  214. SessionWindowStatusValidator func(string) error
  215. )
  216. // QuotaDimension defines the type for the "quota_dimension" enum field.
  217. type QuotaDimension string
  218. // QuotaDimensionGlobal is the default value of the QuotaDimension enum.
  219. const DefaultQuotaDimension = QuotaDimensionGlobal
  220. // QuotaDimension values.
  221. const (
  222. QuotaDimensionGlobal QuotaDimension = "global"
  223. QuotaDimensionSpark QuotaDimension = "spark"
  224. )
  225. func (qd QuotaDimension) String() string {
  226. return string(qd)
  227. }
  228. // QuotaDimensionValidator is a validator for the "quota_dimension" field enum values. It is called by the builders before save.
  229. func QuotaDimensionValidator(qd QuotaDimension) error {
  230. switch qd {
  231. case QuotaDimensionGlobal, QuotaDimensionSpark:
  232. return nil
  233. default:
  234. return fmt.Errorf("account: invalid enum value for quota_dimension field: %q", qd)
  235. }
  236. }
  237. // OrderOption defines the ordering options for the Account queries.
  238. type OrderOption func(*sql.Selector)
  239. // ByID orders the results by the id field.
  240. func ByID(opts ...sql.OrderTermOption) OrderOption {
  241. return sql.OrderByField(FieldID, opts...).ToFunc()
  242. }
  243. // ByCreatedAt orders the results by the created_at field.
  244. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
  245. return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
  246. }
  247. // ByUpdatedAt orders the results by the updated_at field.
  248. func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
  249. return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
  250. }
  251. // ByDeletedAt orders the results by the deleted_at field.
  252. func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
  253. return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
  254. }
  255. // ByName orders the results by the name field.
  256. func ByName(opts ...sql.OrderTermOption) OrderOption {
  257. return sql.OrderByField(FieldName, opts...).ToFunc()
  258. }
  259. // ByNotes orders the results by the notes field.
  260. func ByNotes(opts ...sql.OrderTermOption) OrderOption {
  261. return sql.OrderByField(FieldNotes, opts...).ToFunc()
  262. }
  263. // ByPlatform orders the results by the platform field.
  264. func ByPlatform(opts ...sql.OrderTermOption) OrderOption {
  265. return sql.OrderByField(FieldPlatform, opts...).ToFunc()
  266. }
  267. // ByType orders the results by the type field.
  268. func ByType(opts ...sql.OrderTermOption) OrderOption {
  269. return sql.OrderByField(FieldType, opts...).ToFunc()
  270. }
  271. // ByProxyID orders the results by the proxy_id field.
  272. func ByProxyID(opts ...sql.OrderTermOption) OrderOption {
  273. return sql.OrderByField(FieldProxyID, opts...).ToFunc()
  274. }
  275. // ByProxyFallbackOriginID orders the results by the proxy_fallback_origin_id field.
  276. func ByProxyFallbackOriginID(opts ...sql.OrderTermOption) OrderOption {
  277. return sql.OrderByField(FieldProxyFallbackOriginID, opts...).ToFunc()
  278. }
  279. // ByConcurrency orders the results by the concurrency field.
  280. func ByConcurrency(opts ...sql.OrderTermOption) OrderOption {
  281. return sql.OrderByField(FieldConcurrency, opts...).ToFunc()
  282. }
  283. // ByLoadFactor orders the results by the load_factor field.
  284. func ByLoadFactor(opts ...sql.OrderTermOption) OrderOption {
  285. return sql.OrderByField(FieldLoadFactor, opts...).ToFunc()
  286. }
  287. // ByPriority orders the results by the priority field.
  288. func ByPriority(opts ...sql.OrderTermOption) OrderOption {
  289. return sql.OrderByField(FieldPriority, opts...).ToFunc()
  290. }
  291. // ByRateMultiplier orders the results by the rate_multiplier field.
  292. func ByRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
  293. return sql.OrderByField(FieldRateMultiplier, opts...).ToFunc()
  294. }
  295. // ByStatus orders the results by the status field.
  296. func ByStatus(opts ...sql.OrderTermOption) OrderOption {
  297. return sql.OrderByField(FieldStatus, opts...).ToFunc()
  298. }
  299. // ByErrorMessage orders the results by the error_message field.
  300. func ByErrorMessage(opts ...sql.OrderTermOption) OrderOption {
  301. return sql.OrderByField(FieldErrorMessage, opts...).ToFunc()
  302. }
  303. // ByLastUsedAt orders the results by the last_used_at field.
  304. func ByLastUsedAt(opts ...sql.OrderTermOption) OrderOption {
  305. return sql.OrderByField(FieldLastUsedAt, opts...).ToFunc()
  306. }
  307. // ByExpiresAt orders the results by the expires_at field.
  308. func ByExpiresAt(opts ...sql.OrderTermOption) OrderOption {
  309. return sql.OrderByField(FieldExpiresAt, opts...).ToFunc()
  310. }
  311. // ByAutoPauseOnExpired orders the results by the auto_pause_on_expired field.
  312. func ByAutoPauseOnExpired(opts ...sql.OrderTermOption) OrderOption {
  313. return sql.OrderByField(FieldAutoPauseOnExpired, opts...).ToFunc()
  314. }
  315. // BySchedulable orders the results by the schedulable field.
  316. func BySchedulable(opts ...sql.OrderTermOption) OrderOption {
  317. return sql.OrderByField(FieldSchedulable, opts...).ToFunc()
  318. }
  319. // ByRateLimitedAt orders the results by the rate_limited_at field.
  320. func ByRateLimitedAt(opts ...sql.OrderTermOption) OrderOption {
  321. return sql.OrderByField(FieldRateLimitedAt, opts...).ToFunc()
  322. }
  323. // ByRateLimitResetAt orders the results by the rate_limit_reset_at field.
  324. func ByRateLimitResetAt(opts ...sql.OrderTermOption) OrderOption {
  325. return sql.OrderByField(FieldRateLimitResetAt, opts...).ToFunc()
  326. }
  327. // ByOverloadUntil orders the results by the overload_until field.
  328. func ByOverloadUntil(opts ...sql.OrderTermOption) OrderOption {
  329. return sql.OrderByField(FieldOverloadUntil, opts...).ToFunc()
  330. }
  331. // ByTempUnschedulableUntil orders the results by the temp_unschedulable_until field.
  332. func ByTempUnschedulableUntil(opts ...sql.OrderTermOption) OrderOption {
  333. return sql.OrderByField(FieldTempUnschedulableUntil, opts...).ToFunc()
  334. }
  335. // ByTempUnschedulableReason orders the results by the temp_unschedulable_reason field.
  336. func ByTempUnschedulableReason(opts ...sql.OrderTermOption) OrderOption {
  337. return sql.OrderByField(FieldTempUnschedulableReason, opts...).ToFunc()
  338. }
  339. // BySessionWindowStart orders the results by the session_window_start field.
  340. func BySessionWindowStart(opts ...sql.OrderTermOption) OrderOption {
  341. return sql.OrderByField(FieldSessionWindowStart, opts...).ToFunc()
  342. }
  343. // BySessionWindowEnd orders the results by the session_window_end field.
  344. func BySessionWindowEnd(opts ...sql.OrderTermOption) OrderOption {
  345. return sql.OrderByField(FieldSessionWindowEnd, opts...).ToFunc()
  346. }
  347. // BySessionWindowStatus orders the results by the session_window_status field.
  348. func BySessionWindowStatus(opts ...sql.OrderTermOption) OrderOption {
  349. return sql.OrderByField(FieldSessionWindowStatus, opts...).ToFunc()
  350. }
  351. // ByParentAccountID orders the results by the parent_account_id field.
  352. func ByParentAccountID(opts ...sql.OrderTermOption) OrderOption {
  353. return sql.OrderByField(FieldParentAccountID, opts...).ToFunc()
  354. }
  355. // ByQuotaDimension orders the results by the quota_dimension field.
  356. func ByQuotaDimension(opts ...sql.OrderTermOption) OrderOption {
  357. return sql.OrderByField(FieldQuotaDimension, opts...).ToFunc()
  358. }
  359. // ByGroupsCount orders the results by groups count.
  360. func ByGroupsCount(opts ...sql.OrderTermOption) OrderOption {
  361. return func(s *sql.Selector) {
  362. sqlgraph.OrderByNeighborsCount(s, newGroupsStep(), opts...)
  363. }
  364. }
  365. // ByGroups orders the results by groups terms.
  366. func ByGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
  367. return func(s *sql.Selector) {
  368. sqlgraph.OrderByNeighborTerms(s, newGroupsStep(), append([]sql.OrderTerm{term}, terms...)...)
  369. }
  370. }
  371. // ByProxyField orders the results by proxy field.
  372. func ByProxyField(field string, opts ...sql.OrderTermOption) OrderOption {
  373. return func(s *sql.Selector) {
  374. sqlgraph.OrderByNeighborTerms(s, newProxyStep(), sql.OrderByField(field, opts...))
  375. }
  376. }
  377. // ByParentField orders the results by parent field.
  378. func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption {
  379. return func(s *sql.Selector) {
  380. sqlgraph.OrderByNeighborTerms(s, newParentStep(), sql.OrderByField(field, opts...))
  381. }
  382. }
  383. // ByChildrenCount orders the results by children count.
  384. func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption {
  385. return func(s *sql.Selector) {
  386. sqlgraph.OrderByNeighborsCount(s, newChildrenStep(), opts...)
  387. }
  388. }
  389. // ByChildren orders the results by children terms.
  390. func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
  391. return func(s *sql.Selector) {
  392. sqlgraph.OrderByNeighborTerms(s, newChildrenStep(), append([]sql.OrderTerm{term}, terms...)...)
  393. }
  394. }
  395. // ByUsageLogsCount orders the results by usage_logs count.
  396. func ByUsageLogsCount(opts ...sql.OrderTermOption) OrderOption {
  397. return func(s *sql.Selector) {
  398. sqlgraph.OrderByNeighborsCount(s, newUsageLogsStep(), opts...)
  399. }
  400. }
  401. // ByUsageLogs orders the results by usage_logs terms.
  402. func ByUsageLogs(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
  403. return func(s *sql.Selector) {
  404. sqlgraph.OrderByNeighborTerms(s, newUsageLogsStep(), append([]sql.OrderTerm{term}, terms...)...)
  405. }
  406. }
  407. // ByAccountGroupsCount orders the results by account_groups count.
  408. func ByAccountGroupsCount(opts ...sql.OrderTermOption) OrderOption {
  409. return func(s *sql.Selector) {
  410. sqlgraph.OrderByNeighborsCount(s, newAccountGroupsStep(), opts...)
  411. }
  412. }
  413. // ByAccountGroups orders the results by account_groups terms.
  414. func ByAccountGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
  415. return func(s *sql.Selector) {
  416. sqlgraph.OrderByNeighborTerms(s, newAccountGroupsStep(), append([]sql.OrderTerm{term}, terms...)...)
  417. }
  418. }
  419. func newGroupsStep() *sqlgraph.Step {
  420. return sqlgraph.NewStep(
  421. sqlgraph.From(Table, FieldID),
  422. sqlgraph.To(GroupsInverseTable, FieldID),
  423. sqlgraph.Edge(sqlgraph.M2M, false, GroupsTable, GroupsPrimaryKey...),
  424. )
  425. }
  426. func newProxyStep() *sqlgraph.Step {
  427. return sqlgraph.NewStep(
  428. sqlgraph.From(Table, FieldID),
  429. sqlgraph.To(ProxyInverseTable, FieldID),
  430. sqlgraph.Edge(sqlgraph.M2O, false, ProxyTable, ProxyColumn),
  431. )
  432. }
  433. func newParentStep() *sqlgraph.Step {
  434. return sqlgraph.NewStep(
  435. sqlgraph.From(Table, FieldID),
  436. sqlgraph.To(Table, FieldID),
  437. sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn),
  438. )
  439. }
  440. func newChildrenStep() *sqlgraph.Step {
  441. return sqlgraph.NewStep(
  442. sqlgraph.From(Table, FieldID),
  443. sqlgraph.To(Table, FieldID),
  444. sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn),
  445. )
  446. }
  447. func newUsageLogsStep() *sqlgraph.Step {
  448. return sqlgraph.NewStep(
  449. sqlgraph.From(Table, FieldID),
  450. sqlgraph.To(UsageLogsInverseTable, FieldID),
  451. sqlgraph.Edge(sqlgraph.O2M, false, UsageLogsTable, UsageLogsColumn),
  452. )
  453. }
  454. func newAccountGroupsStep() *sqlgraph.Step {
  455. return sqlgraph.NewStep(
  456. sqlgraph.From(Table, FieldID),
  457. sqlgraph.To(AccountGroupsInverseTable, AccountGroupsColumn),
  458. sqlgraph.Edge(sqlgraph.O2M, true, AccountGroupsTable, AccountGroupsColumn),
  459. )
  460. }