github.com/ngocphuongnb/tetua@v0.0.7-alpha/packages/entrepository/ent/entql.go (about)

     1  // Code generated by entc, DO NOT EDIT.
     2  
     3  package ent
     4  
     5  import (
     6  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/comment"
     7  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/file"
     8  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/page"
     9  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/permission"
    10  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/post"
    11  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/predicate"
    12  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/role"
    13  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/setting"
    14  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/topic"
    15  	"github.com/ngocphuongnb/tetua/packages/entrepository/ent/user"
    16  
    17  	"entgo.io/ent/dialect/sql"
    18  	"entgo.io/ent/dialect/sql/sqlgraph"
    19  	"entgo.io/ent/entql"
    20  	"entgo.io/ent/schema/field"
    21  )
    22  
    23  // schemaGraph holds a representation of ent/schema at runtime.
    24  var schemaGraph = func() *sqlgraph.Schema {
    25  	graph := &sqlgraph.Schema{Nodes: make([]*sqlgraph.Node, 9)}
    26  	graph.Nodes[0] = &sqlgraph.Node{
    27  		NodeSpec: sqlgraph.NodeSpec{
    28  			Table:   comment.Table,
    29  			Columns: comment.Columns,
    30  			ID: &sqlgraph.FieldSpec{
    31  				Type:   field.TypeInt,
    32  				Column: comment.FieldID,
    33  			},
    34  		},
    35  		Type: "Comment",
    36  		Fields: map[string]*sqlgraph.FieldSpec{
    37  			comment.FieldCreatedAt:   {Type: field.TypeTime, Column: comment.FieldCreatedAt},
    38  			comment.FieldUpdatedAt:   {Type: field.TypeTime, Column: comment.FieldUpdatedAt},
    39  			comment.FieldDeletedAt:   {Type: field.TypeTime, Column: comment.FieldDeletedAt},
    40  			comment.FieldContent:     {Type: field.TypeString, Column: comment.FieldContent},
    41  			comment.FieldContentHTML: {Type: field.TypeString, Column: comment.FieldContentHTML},
    42  			comment.FieldVotes:       {Type: field.TypeInt64, Column: comment.FieldVotes},
    43  			comment.FieldPostID:      {Type: field.TypeInt, Column: comment.FieldPostID},
    44  			comment.FieldUserID:      {Type: field.TypeInt, Column: comment.FieldUserID},
    45  			comment.FieldParentID:    {Type: field.TypeInt, Column: comment.FieldParentID},
    46  		},
    47  	}
    48  	graph.Nodes[1] = &sqlgraph.Node{
    49  		NodeSpec: sqlgraph.NodeSpec{
    50  			Table:   file.Table,
    51  			Columns: file.Columns,
    52  			ID: &sqlgraph.FieldSpec{
    53  				Type:   field.TypeInt,
    54  				Column: file.FieldID,
    55  			},
    56  		},
    57  		Type: "File",
    58  		Fields: map[string]*sqlgraph.FieldSpec{
    59  			file.FieldCreatedAt: {Type: field.TypeTime, Column: file.FieldCreatedAt},
    60  			file.FieldUpdatedAt: {Type: field.TypeTime, Column: file.FieldUpdatedAt},
    61  			file.FieldDeletedAt: {Type: field.TypeTime, Column: file.FieldDeletedAt},
    62  			file.FieldDisk:      {Type: field.TypeString, Column: file.FieldDisk},
    63  			file.FieldPath:      {Type: field.TypeString, Column: file.FieldPath},
    64  			file.FieldType:      {Type: field.TypeString, Column: file.FieldType},
    65  			file.FieldSize:      {Type: field.TypeInt, Column: file.FieldSize},
    66  			file.FieldUserID:    {Type: field.TypeInt, Column: file.FieldUserID},
    67  		},
    68  	}
    69  	graph.Nodes[2] = &sqlgraph.Node{
    70  		NodeSpec: sqlgraph.NodeSpec{
    71  			Table:   page.Table,
    72  			Columns: page.Columns,
    73  			ID: &sqlgraph.FieldSpec{
    74  				Type:   field.TypeInt,
    75  				Column: page.FieldID,
    76  			},
    77  		},
    78  		Type: "Page",
    79  		Fields: map[string]*sqlgraph.FieldSpec{
    80  			page.FieldCreatedAt:       {Type: field.TypeTime, Column: page.FieldCreatedAt},
    81  			page.FieldUpdatedAt:       {Type: field.TypeTime, Column: page.FieldUpdatedAt},
    82  			page.FieldDeletedAt:       {Type: field.TypeTime, Column: page.FieldDeletedAt},
    83  			page.FieldName:            {Type: field.TypeString, Column: page.FieldName},
    84  			page.FieldSlug:            {Type: field.TypeString, Column: page.FieldSlug},
    85  			page.FieldContent:         {Type: field.TypeString, Column: page.FieldContent},
    86  			page.FieldContentHTML:     {Type: field.TypeString, Column: page.FieldContentHTML},
    87  			page.FieldDraft:           {Type: field.TypeBool, Column: page.FieldDraft},
    88  			page.FieldFeaturedImageID: {Type: field.TypeInt, Column: page.FieldFeaturedImageID},
    89  		},
    90  	}
    91  	graph.Nodes[3] = &sqlgraph.Node{
    92  		NodeSpec: sqlgraph.NodeSpec{
    93  			Table:   permission.Table,
    94  			Columns: permission.Columns,
    95  			ID: &sqlgraph.FieldSpec{
    96  				Type:   field.TypeInt,
    97  				Column: permission.FieldID,
    98  			},
    99  		},
   100  		Type: "Permission",
   101  		Fields: map[string]*sqlgraph.FieldSpec{
   102  			permission.FieldCreatedAt: {Type: field.TypeTime, Column: permission.FieldCreatedAt},
   103  			permission.FieldUpdatedAt: {Type: field.TypeTime, Column: permission.FieldUpdatedAt},
   104  			permission.FieldDeletedAt: {Type: field.TypeTime, Column: permission.FieldDeletedAt},
   105  			permission.FieldRoleID:    {Type: field.TypeInt, Column: permission.FieldRoleID},
   106  			permission.FieldAction:    {Type: field.TypeString, Column: permission.FieldAction},
   107  			permission.FieldValue:     {Type: field.TypeString, Column: permission.FieldValue},
   108  		},
   109  	}
   110  	graph.Nodes[4] = &sqlgraph.Node{
   111  		NodeSpec: sqlgraph.NodeSpec{
   112  			Table:   post.Table,
   113  			Columns: post.Columns,
   114  			ID: &sqlgraph.FieldSpec{
   115  				Type:   field.TypeInt,
   116  				Column: post.FieldID,
   117  			},
   118  		},
   119  		Type: "Post",
   120  		Fields: map[string]*sqlgraph.FieldSpec{
   121  			post.FieldCreatedAt:       {Type: field.TypeTime, Column: post.FieldCreatedAt},
   122  			post.FieldUpdatedAt:       {Type: field.TypeTime, Column: post.FieldUpdatedAt},
   123  			post.FieldDeletedAt:       {Type: field.TypeTime, Column: post.FieldDeletedAt},
   124  			post.FieldName:            {Type: field.TypeString, Column: post.FieldName},
   125  			post.FieldSlug:            {Type: field.TypeString, Column: post.FieldSlug},
   126  			post.FieldDescription:     {Type: field.TypeString, Column: post.FieldDescription},
   127  			post.FieldContent:         {Type: field.TypeString, Column: post.FieldContent},
   128  			post.FieldContentHTML:     {Type: field.TypeString, Column: post.FieldContentHTML},
   129  			post.FieldViewCount:       {Type: field.TypeInt64, Column: post.FieldViewCount},
   130  			post.FieldCommentCount:    {Type: field.TypeInt64, Column: post.FieldCommentCount},
   131  			post.FieldRatingCount:     {Type: field.TypeInt64, Column: post.FieldRatingCount},
   132  			post.FieldRatingTotal:     {Type: field.TypeInt64, Column: post.FieldRatingTotal},
   133  			post.FieldDraft:           {Type: field.TypeBool, Column: post.FieldDraft},
   134  			post.FieldApproved:        {Type: field.TypeBool, Column: post.FieldApproved},
   135  			post.FieldFeaturedImageID: {Type: field.TypeInt, Column: post.FieldFeaturedImageID},
   136  			post.FieldUserID:          {Type: field.TypeInt, Column: post.FieldUserID},
   137  		},
   138  	}
   139  	graph.Nodes[5] = &sqlgraph.Node{
   140  		NodeSpec: sqlgraph.NodeSpec{
   141  			Table:   role.Table,
   142  			Columns: role.Columns,
   143  			ID: &sqlgraph.FieldSpec{
   144  				Type:   field.TypeInt,
   145  				Column: role.FieldID,
   146  			},
   147  		},
   148  		Type: "Role",
   149  		Fields: map[string]*sqlgraph.FieldSpec{
   150  			role.FieldCreatedAt:   {Type: field.TypeTime, Column: role.FieldCreatedAt},
   151  			role.FieldUpdatedAt:   {Type: field.TypeTime, Column: role.FieldUpdatedAt},
   152  			role.FieldDeletedAt:   {Type: field.TypeTime, Column: role.FieldDeletedAt},
   153  			role.FieldName:        {Type: field.TypeString, Column: role.FieldName},
   154  			role.FieldDescription: {Type: field.TypeString, Column: role.FieldDescription},
   155  			role.FieldRoot:        {Type: field.TypeBool, Column: role.FieldRoot},
   156  		},
   157  	}
   158  	graph.Nodes[6] = &sqlgraph.Node{
   159  		NodeSpec: sqlgraph.NodeSpec{
   160  			Table:   setting.Table,
   161  			Columns: setting.Columns,
   162  			ID: &sqlgraph.FieldSpec{
   163  				Type:   field.TypeInt,
   164  				Column: setting.FieldID,
   165  			},
   166  		},
   167  		Type: "Setting",
   168  		Fields: map[string]*sqlgraph.FieldSpec{
   169  			setting.FieldCreatedAt: {Type: field.TypeTime, Column: setting.FieldCreatedAt},
   170  			setting.FieldUpdatedAt: {Type: field.TypeTime, Column: setting.FieldUpdatedAt},
   171  			setting.FieldDeletedAt: {Type: field.TypeTime, Column: setting.FieldDeletedAt},
   172  			setting.FieldName:      {Type: field.TypeString, Column: setting.FieldName},
   173  			setting.FieldValue:     {Type: field.TypeString, Column: setting.FieldValue},
   174  			setting.FieldType:      {Type: field.TypeString, Column: setting.FieldType},
   175  		},
   176  	}
   177  	graph.Nodes[7] = &sqlgraph.Node{
   178  		NodeSpec: sqlgraph.NodeSpec{
   179  			Table:   topic.Table,
   180  			Columns: topic.Columns,
   181  			ID: &sqlgraph.FieldSpec{
   182  				Type:   field.TypeInt,
   183  				Column: topic.FieldID,
   184  			},
   185  		},
   186  		Type: "Topic",
   187  		Fields: map[string]*sqlgraph.FieldSpec{
   188  			topic.FieldCreatedAt:   {Type: field.TypeTime, Column: topic.FieldCreatedAt},
   189  			topic.FieldUpdatedAt:   {Type: field.TypeTime, Column: topic.FieldUpdatedAt},
   190  			topic.FieldDeletedAt:   {Type: field.TypeTime, Column: topic.FieldDeletedAt},
   191  			topic.FieldName:        {Type: field.TypeString, Column: topic.FieldName},
   192  			topic.FieldSlug:        {Type: field.TypeString, Column: topic.FieldSlug},
   193  			topic.FieldDescription: {Type: field.TypeString, Column: topic.FieldDescription},
   194  			topic.FieldContent:     {Type: field.TypeString, Column: topic.FieldContent},
   195  			topic.FieldContentHTML: {Type: field.TypeString, Column: topic.FieldContentHTML},
   196  			topic.FieldParentID:    {Type: field.TypeInt, Column: topic.FieldParentID},
   197  		},
   198  	}
   199  	graph.Nodes[8] = &sqlgraph.Node{
   200  		NodeSpec: sqlgraph.NodeSpec{
   201  			Table:   user.Table,
   202  			Columns: user.Columns,
   203  			ID: &sqlgraph.FieldSpec{
   204  				Type:   field.TypeInt,
   205  				Column: user.FieldID,
   206  			},
   207  		},
   208  		Type: "User",
   209  		Fields: map[string]*sqlgraph.FieldSpec{
   210  			user.FieldCreatedAt:        {Type: field.TypeTime, Column: user.FieldCreatedAt},
   211  			user.FieldUpdatedAt:        {Type: field.TypeTime, Column: user.FieldUpdatedAt},
   212  			user.FieldDeletedAt:        {Type: field.TypeTime, Column: user.FieldDeletedAt},
   213  			user.FieldUsername:         {Type: field.TypeString, Column: user.FieldUsername},
   214  			user.FieldDisplayName:      {Type: field.TypeString, Column: user.FieldDisplayName},
   215  			user.FieldURL:              {Type: field.TypeString, Column: user.FieldURL},
   216  			user.FieldProvider:         {Type: field.TypeString, Column: user.FieldProvider},
   217  			user.FieldProviderID:       {Type: field.TypeString, Column: user.FieldProviderID},
   218  			user.FieldProviderUsername: {Type: field.TypeString, Column: user.FieldProviderUsername},
   219  			user.FieldProviderAvatar:   {Type: field.TypeString, Column: user.FieldProviderAvatar},
   220  			user.FieldEmail:            {Type: field.TypeString, Column: user.FieldEmail},
   221  			user.FieldPassword:         {Type: field.TypeString, Column: user.FieldPassword},
   222  			user.FieldBio:              {Type: field.TypeString, Column: user.FieldBio},
   223  			user.FieldBioHTML:          {Type: field.TypeString, Column: user.FieldBioHTML},
   224  			user.FieldActive:           {Type: field.TypeBool, Column: user.FieldActive},
   225  			user.FieldAvatarImageID:    {Type: field.TypeInt, Column: user.FieldAvatarImageID},
   226  		},
   227  	}
   228  	graph.MustAddE(
   229  		"post",
   230  		&sqlgraph.EdgeSpec{
   231  			Rel:     sqlgraph.M2O,
   232  			Inverse: true,
   233  			Table:   comment.PostTable,
   234  			Columns: []string{comment.PostColumn},
   235  			Bidi:    false,
   236  		},
   237  		"Comment",
   238  		"Post",
   239  	)
   240  	graph.MustAddE(
   241  		"user",
   242  		&sqlgraph.EdgeSpec{
   243  			Rel:     sqlgraph.M2O,
   244  			Inverse: true,
   245  			Table:   comment.UserTable,
   246  			Columns: []string{comment.UserColumn},
   247  			Bidi:    false,
   248  		},
   249  		"Comment",
   250  		"User",
   251  	)
   252  	graph.MustAddE(
   253  		"children",
   254  		&sqlgraph.EdgeSpec{
   255  			Rel:     sqlgraph.O2M,
   256  			Inverse: false,
   257  			Table:   comment.ChildrenTable,
   258  			Columns: []string{comment.ChildrenColumn},
   259  			Bidi:    true,
   260  		},
   261  		"Comment",
   262  		"Comment",
   263  	)
   264  	graph.MustAddE(
   265  		"parent",
   266  		&sqlgraph.EdgeSpec{
   267  			Rel:     sqlgraph.M2O,
   268  			Inverse: true,
   269  			Table:   comment.ParentTable,
   270  			Columns: []string{comment.ParentColumn},
   271  			Bidi:    false,
   272  		},
   273  		"Comment",
   274  		"Comment",
   275  	)
   276  	graph.MustAddE(
   277  		"user",
   278  		&sqlgraph.EdgeSpec{
   279  			Rel:     sqlgraph.M2O,
   280  			Inverse: true,
   281  			Table:   file.UserTable,
   282  			Columns: []string{file.UserColumn},
   283  			Bidi:    false,
   284  		},
   285  		"File",
   286  		"User",
   287  	)
   288  	graph.MustAddE(
   289  		"posts",
   290  		&sqlgraph.EdgeSpec{
   291  			Rel:     sqlgraph.O2M,
   292  			Inverse: false,
   293  			Table:   file.PostsTable,
   294  			Columns: []string{file.PostsColumn},
   295  			Bidi:    false,
   296  		},
   297  		"File",
   298  		"Post",
   299  	)
   300  	graph.MustAddE(
   301  		"pages",
   302  		&sqlgraph.EdgeSpec{
   303  			Rel:     sqlgraph.O2M,
   304  			Inverse: false,
   305  			Table:   file.PagesTable,
   306  			Columns: []string{file.PagesColumn},
   307  			Bidi:    false,
   308  		},
   309  		"File",
   310  		"Page",
   311  	)
   312  	graph.MustAddE(
   313  		"user_avatars",
   314  		&sqlgraph.EdgeSpec{
   315  			Rel:     sqlgraph.O2M,
   316  			Inverse: false,
   317  			Table:   file.UserAvatarsTable,
   318  			Columns: []string{file.UserAvatarsColumn},
   319  			Bidi:    false,
   320  		},
   321  		"File",
   322  		"User",
   323  	)
   324  	graph.MustAddE(
   325  		"featured_image",
   326  		&sqlgraph.EdgeSpec{
   327  			Rel:     sqlgraph.M2O,
   328  			Inverse: true,
   329  			Table:   page.FeaturedImageTable,
   330  			Columns: []string{page.FeaturedImageColumn},
   331  			Bidi:    false,
   332  		},
   333  		"Page",
   334  		"File",
   335  	)
   336  	graph.MustAddE(
   337  		"role",
   338  		&sqlgraph.EdgeSpec{
   339  			Rel:     sqlgraph.M2O,
   340  			Inverse: true,
   341  			Table:   permission.RoleTable,
   342  			Columns: []string{permission.RoleColumn},
   343  			Bidi:    false,
   344  		},
   345  		"Permission",
   346  		"Role",
   347  	)
   348  	graph.MustAddE(
   349  		"user",
   350  		&sqlgraph.EdgeSpec{
   351  			Rel:     sqlgraph.M2O,
   352  			Inverse: true,
   353  			Table:   post.UserTable,
   354  			Columns: []string{post.UserColumn},
   355  			Bidi:    false,
   356  		},
   357  		"Post",
   358  		"User",
   359  	)
   360  	graph.MustAddE(
   361  		"topics",
   362  		&sqlgraph.EdgeSpec{
   363  			Rel:     sqlgraph.M2M,
   364  			Inverse: true,
   365  			Table:   post.TopicsTable,
   366  			Columns: post.TopicsPrimaryKey,
   367  			Bidi:    false,
   368  		},
   369  		"Post",
   370  		"Topic",
   371  	)
   372  	graph.MustAddE(
   373  		"featured_image",
   374  		&sqlgraph.EdgeSpec{
   375  			Rel:     sqlgraph.M2O,
   376  			Inverse: true,
   377  			Table:   post.FeaturedImageTable,
   378  			Columns: []string{post.FeaturedImageColumn},
   379  			Bidi:    false,
   380  		},
   381  		"Post",
   382  		"File",
   383  	)
   384  	graph.MustAddE(
   385  		"comments",
   386  		&sqlgraph.EdgeSpec{
   387  			Rel:     sqlgraph.O2M,
   388  			Inverse: false,
   389  			Table:   post.CommentsTable,
   390  			Columns: []string{post.CommentsColumn},
   391  			Bidi:    false,
   392  		},
   393  		"Post",
   394  		"Comment",
   395  	)
   396  	graph.MustAddE(
   397  		"permissions",
   398  		&sqlgraph.EdgeSpec{
   399  			Rel:     sqlgraph.O2M,
   400  			Inverse: false,
   401  			Table:   role.PermissionsTable,
   402  			Columns: []string{role.PermissionsColumn},
   403  			Bidi:    false,
   404  		},
   405  		"Role",
   406  		"Permission",
   407  	)
   408  	graph.MustAddE(
   409  		"users",
   410  		&sqlgraph.EdgeSpec{
   411  			Rel:     sqlgraph.M2M,
   412  			Inverse: false,
   413  			Table:   role.UsersTable,
   414  			Columns: role.UsersPrimaryKey,
   415  			Bidi:    false,
   416  		},
   417  		"Role",
   418  		"User",
   419  	)
   420  	graph.MustAddE(
   421  		"posts",
   422  		&sqlgraph.EdgeSpec{
   423  			Rel:     sqlgraph.M2M,
   424  			Inverse: false,
   425  			Table:   topic.PostsTable,
   426  			Columns: topic.PostsPrimaryKey,
   427  			Bidi:    false,
   428  		},
   429  		"Topic",
   430  		"Post",
   431  	)
   432  	graph.MustAddE(
   433  		"children",
   434  		&sqlgraph.EdgeSpec{
   435  			Rel:     sqlgraph.O2M,
   436  			Inverse: false,
   437  			Table:   topic.ChildrenTable,
   438  			Columns: []string{topic.ChildrenColumn},
   439  			Bidi:    true,
   440  		},
   441  		"Topic",
   442  		"Topic",
   443  	)
   444  	graph.MustAddE(
   445  		"parent",
   446  		&sqlgraph.EdgeSpec{
   447  			Rel:     sqlgraph.M2O,
   448  			Inverse: true,
   449  			Table:   topic.ParentTable,
   450  			Columns: []string{topic.ParentColumn},
   451  			Bidi:    false,
   452  		},
   453  		"Topic",
   454  		"Topic",
   455  	)
   456  	graph.MustAddE(
   457  		"posts",
   458  		&sqlgraph.EdgeSpec{
   459  			Rel:     sqlgraph.O2M,
   460  			Inverse: false,
   461  			Table:   user.PostsTable,
   462  			Columns: []string{user.PostsColumn},
   463  			Bidi:    false,
   464  		},
   465  		"User",
   466  		"Post",
   467  	)
   468  	graph.MustAddE(
   469  		"files",
   470  		&sqlgraph.EdgeSpec{
   471  			Rel:     sqlgraph.O2M,
   472  			Inverse: false,
   473  			Table:   user.FilesTable,
   474  			Columns: []string{user.FilesColumn},
   475  			Bidi:    false,
   476  		},
   477  		"User",
   478  		"File",
   479  	)
   480  	graph.MustAddE(
   481  		"comments",
   482  		&sqlgraph.EdgeSpec{
   483  			Rel:     sqlgraph.O2M,
   484  			Inverse: false,
   485  			Table:   user.CommentsTable,
   486  			Columns: []string{user.CommentsColumn},
   487  			Bidi:    false,
   488  		},
   489  		"User",
   490  		"Comment",
   491  	)
   492  	graph.MustAddE(
   493  		"roles",
   494  		&sqlgraph.EdgeSpec{
   495  			Rel:     sqlgraph.M2M,
   496  			Inverse: true,
   497  			Table:   user.RolesTable,
   498  			Columns: user.RolesPrimaryKey,
   499  			Bidi:    false,
   500  		},
   501  		"User",
   502  		"Role",
   503  	)
   504  	graph.MustAddE(
   505  		"avatar_image",
   506  		&sqlgraph.EdgeSpec{
   507  			Rel:     sqlgraph.M2O,
   508  			Inverse: true,
   509  			Table:   user.AvatarImageTable,
   510  			Columns: []string{user.AvatarImageColumn},
   511  			Bidi:    false,
   512  		},
   513  		"User",
   514  		"File",
   515  	)
   516  	return graph
   517  }()
   518  
   519  // predicateAdder wraps the addPredicate method.
   520  // All update, update-one and query builders implement this interface.
   521  type predicateAdder interface {
   522  	addPredicate(func(s *sql.Selector))
   523  }
   524  
   525  // addPredicate implements the predicateAdder interface.
   526  func (cq *CommentQuery) addPredicate(pred func(s *sql.Selector)) {
   527  	cq.predicates = append(cq.predicates, pred)
   528  }
   529  
   530  // Filter returns a Filter implementation to apply filters on the CommentQuery builder.
   531  func (cq *CommentQuery) Filter() *CommentFilter {
   532  	return &CommentFilter{cq}
   533  }
   534  
   535  // addPredicate implements the predicateAdder interface.
   536  func (m *CommentMutation) addPredicate(pred func(s *sql.Selector)) {
   537  	m.predicates = append(m.predicates, pred)
   538  }
   539  
   540  // Filter returns an entql.Where implementation to apply filters on the CommentMutation builder.
   541  func (m *CommentMutation) Filter() *CommentFilter {
   542  	return &CommentFilter{m}
   543  }
   544  
   545  // CommentFilter provides a generic filtering capability at runtime for CommentQuery.
   546  type CommentFilter struct {
   547  	predicateAdder
   548  }
   549  
   550  // Where applies the entql predicate on the query filter.
   551  func (f *CommentFilter) Where(p entql.P) {
   552  	f.addPredicate(func(s *sql.Selector) {
   553  		if err := schemaGraph.EvalP(schemaGraph.Nodes[0].Type, p, s); err != nil {
   554  			s.AddError(err)
   555  		}
   556  	})
   557  }
   558  
   559  // WhereID applies the entql int predicate on the id field.
   560  func (f *CommentFilter) WhereID(p entql.IntP) {
   561  	f.Where(p.Field(comment.FieldID))
   562  }
   563  
   564  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
   565  func (f *CommentFilter) WhereCreatedAt(p entql.TimeP) {
   566  	f.Where(p.Field(comment.FieldCreatedAt))
   567  }
   568  
   569  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
   570  func (f *CommentFilter) WhereUpdatedAt(p entql.TimeP) {
   571  	f.Where(p.Field(comment.FieldUpdatedAt))
   572  }
   573  
   574  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
   575  func (f *CommentFilter) WhereDeletedAt(p entql.TimeP) {
   576  	f.Where(p.Field(comment.FieldDeletedAt))
   577  }
   578  
   579  // WhereContent applies the entql string predicate on the content field.
   580  func (f *CommentFilter) WhereContent(p entql.StringP) {
   581  	f.Where(p.Field(comment.FieldContent))
   582  }
   583  
   584  // WhereContentHTML applies the entql string predicate on the content_html field.
   585  func (f *CommentFilter) WhereContentHTML(p entql.StringP) {
   586  	f.Where(p.Field(comment.FieldContentHTML))
   587  }
   588  
   589  // WhereVotes applies the entql int64 predicate on the votes field.
   590  func (f *CommentFilter) WhereVotes(p entql.Int64P) {
   591  	f.Where(p.Field(comment.FieldVotes))
   592  }
   593  
   594  // WherePostID applies the entql int predicate on the post_id field.
   595  func (f *CommentFilter) WherePostID(p entql.IntP) {
   596  	f.Where(p.Field(comment.FieldPostID))
   597  }
   598  
   599  // WhereUserID applies the entql int predicate on the user_id field.
   600  func (f *CommentFilter) WhereUserID(p entql.IntP) {
   601  	f.Where(p.Field(comment.FieldUserID))
   602  }
   603  
   604  // WhereParentID applies the entql int predicate on the parent_id field.
   605  func (f *CommentFilter) WhereParentID(p entql.IntP) {
   606  	f.Where(p.Field(comment.FieldParentID))
   607  }
   608  
   609  // WhereHasPost applies a predicate to check if query has an edge post.
   610  func (f *CommentFilter) WhereHasPost() {
   611  	f.Where(entql.HasEdge("post"))
   612  }
   613  
   614  // WhereHasPostWith applies a predicate to check if query has an edge post with a given conditions (other predicates).
   615  func (f *CommentFilter) WhereHasPostWith(preds ...predicate.Post) {
   616  	f.Where(entql.HasEdgeWith("post", sqlgraph.WrapFunc(func(s *sql.Selector) {
   617  		for _, p := range preds {
   618  			p(s)
   619  		}
   620  	})))
   621  }
   622  
   623  // WhereHasUser applies a predicate to check if query has an edge user.
   624  func (f *CommentFilter) WhereHasUser() {
   625  	f.Where(entql.HasEdge("user"))
   626  }
   627  
   628  // WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
   629  func (f *CommentFilter) WhereHasUserWith(preds ...predicate.User) {
   630  	f.Where(entql.HasEdgeWith("user", sqlgraph.WrapFunc(func(s *sql.Selector) {
   631  		for _, p := range preds {
   632  			p(s)
   633  		}
   634  	})))
   635  }
   636  
   637  // WhereHasChildren applies a predicate to check if query has an edge children.
   638  func (f *CommentFilter) WhereHasChildren() {
   639  	f.Where(entql.HasEdge("children"))
   640  }
   641  
   642  // WhereHasChildrenWith applies a predicate to check if query has an edge children with a given conditions (other predicates).
   643  func (f *CommentFilter) WhereHasChildrenWith(preds ...predicate.Comment) {
   644  	f.Where(entql.HasEdgeWith("children", sqlgraph.WrapFunc(func(s *sql.Selector) {
   645  		for _, p := range preds {
   646  			p(s)
   647  		}
   648  	})))
   649  }
   650  
   651  // WhereHasParent applies a predicate to check if query has an edge parent.
   652  func (f *CommentFilter) WhereHasParent() {
   653  	f.Where(entql.HasEdge("parent"))
   654  }
   655  
   656  // WhereHasParentWith applies a predicate to check if query has an edge parent with a given conditions (other predicates).
   657  func (f *CommentFilter) WhereHasParentWith(preds ...predicate.Comment) {
   658  	f.Where(entql.HasEdgeWith("parent", sqlgraph.WrapFunc(func(s *sql.Selector) {
   659  		for _, p := range preds {
   660  			p(s)
   661  		}
   662  	})))
   663  }
   664  
   665  // addPredicate implements the predicateAdder interface.
   666  func (fq *FileQuery) addPredicate(pred func(s *sql.Selector)) {
   667  	fq.predicates = append(fq.predicates, pred)
   668  }
   669  
   670  // Filter returns a Filter implementation to apply filters on the FileQuery builder.
   671  func (fq *FileQuery) Filter() *FileFilter {
   672  	return &FileFilter{fq}
   673  }
   674  
   675  // addPredicate implements the predicateAdder interface.
   676  func (m *FileMutation) addPredicate(pred func(s *sql.Selector)) {
   677  	m.predicates = append(m.predicates, pred)
   678  }
   679  
   680  // Filter returns an entql.Where implementation to apply filters on the FileMutation builder.
   681  func (m *FileMutation) Filter() *FileFilter {
   682  	return &FileFilter{m}
   683  }
   684  
   685  // FileFilter provides a generic filtering capability at runtime for FileQuery.
   686  type FileFilter struct {
   687  	predicateAdder
   688  }
   689  
   690  // Where applies the entql predicate on the query filter.
   691  func (f *FileFilter) Where(p entql.P) {
   692  	f.addPredicate(func(s *sql.Selector) {
   693  		if err := schemaGraph.EvalP(schemaGraph.Nodes[1].Type, p, s); err != nil {
   694  			s.AddError(err)
   695  		}
   696  	})
   697  }
   698  
   699  // WhereID applies the entql int predicate on the id field.
   700  func (f *FileFilter) WhereID(p entql.IntP) {
   701  	f.Where(p.Field(file.FieldID))
   702  }
   703  
   704  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
   705  func (f *FileFilter) WhereCreatedAt(p entql.TimeP) {
   706  	f.Where(p.Field(file.FieldCreatedAt))
   707  }
   708  
   709  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
   710  func (f *FileFilter) WhereUpdatedAt(p entql.TimeP) {
   711  	f.Where(p.Field(file.FieldUpdatedAt))
   712  }
   713  
   714  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
   715  func (f *FileFilter) WhereDeletedAt(p entql.TimeP) {
   716  	f.Where(p.Field(file.FieldDeletedAt))
   717  }
   718  
   719  // WhereDisk applies the entql string predicate on the disk field.
   720  func (f *FileFilter) WhereDisk(p entql.StringP) {
   721  	f.Where(p.Field(file.FieldDisk))
   722  }
   723  
   724  // WherePath applies the entql string predicate on the path field.
   725  func (f *FileFilter) WherePath(p entql.StringP) {
   726  	f.Where(p.Field(file.FieldPath))
   727  }
   728  
   729  // WhereType applies the entql string predicate on the type field.
   730  func (f *FileFilter) WhereType(p entql.StringP) {
   731  	f.Where(p.Field(file.FieldType))
   732  }
   733  
   734  // WhereSize applies the entql int predicate on the size field.
   735  func (f *FileFilter) WhereSize(p entql.IntP) {
   736  	f.Where(p.Field(file.FieldSize))
   737  }
   738  
   739  // WhereUserID applies the entql int predicate on the user_id field.
   740  func (f *FileFilter) WhereUserID(p entql.IntP) {
   741  	f.Where(p.Field(file.FieldUserID))
   742  }
   743  
   744  // WhereHasUser applies a predicate to check if query has an edge user.
   745  func (f *FileFilter) WhereHasUser() {
   746  	f.Where(entql.HasEdge("user"))
   747  }
   748  
   749  // WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
   750  func (f *FileFilter) WhereHasUserWith(preds ...predicate.User) {
   751  	f.Where(entql.HasEdgeWith("user", sqlgraph.WrapFunc(func(s *sql.Selector) {
   752  		for _, p := range preds {
   753  			p(s)
   754  		}
   755  	})))
   756  }
   757  
   758  // WhereHasPosts applies a predicate to check if query has an edge posts.
   759  func (f *FileFilter) WhereHasPosts() {
   760  	f.Where(entql.HasEdge("posts"))
   761  }
   762  
   763  // WhereHasPostsWith applies a predicate to check if query has an edge posts with a given conditions (other predicates).
   764  func (f *FileFilter) WhereHasPostsWith(preds ...predicate.Post) {
   765  	f.Where(entql.HasEdgeWith("posts", sqlgraph.WrapFunc(func(s *sql.Selector) {
   766  		for _, p := range preds {
   767  			p(s)
   768  		}
   769  	})))
   770  }
   771  
   772  // WhereHasPages applies a predicate to check if query has an edge pages.
   773  func (f *FileFilter) WhereHasPages() {
   774  	f.Where(entql.HasEdge("pages"))
   775  }
   776  
   777  // WhereHasPagesWith applies a predicate to check if query has an edge pages with a given conditions (other predicates).
   778  func (f *FileFilter) WhereHasPagesWith(preds ...predicate.Page) {
   779  	f.Where(entql.HasEdgeWith("pages", sqlgraph.WrapFunc(func(s *sql.Selector) {
   780  		for _, p := range preds {
   781  			p(s)
   782  		}
   783  	})))
   784  }
   785  
   786  // WhereHasUserAvatars applies a predicate to check if query has an edge user_avatars.
   787  func (f *FileFilter) WhereHasUserAvatars() {
   788  	f.Where(entql.HasEdge("user_avatars"))
   789  }
   790  
   791  // WhereHasUserAvatarsWith applies a predicate to check if query has an edge user_avatars with a given conditions (other predicates).
   792  func (f *FileFilter) WhereHasUserAvatarsWith(preds ...predicate.User) {
   793  	f.Where(entql.HasEdgeWith("user_avatars", sqlgraph.WrapFunc(func(s *sql.Selector) {
   794  		for _, p := range preds {
   795  			p(s)
   796  		}
   797  	})))
   798  }
   799  
   800  // addPredicate implements the predicateAdder interface.
   801  func (pq *PageQuery) addPredicate(pred func(s *sql.Selector)) {
   802  	pq.predicates = append(pq.predicates, pred)
   803  }
   804  
   805  // Filter returns a Filter implementation to apply filters on the PageQuery builder.
   806  func (pq *PageQuery) Filter() *PageFilter {
   807  	return &PageFilter{pq}
   808  }
   809  
   810  // addPredicate implements the predicateAdder interface.
   811  func (m *PageMutation) addPredicate(pred func(s *sql.Selector)) {
   812  	m.predicates = append(m.predicates, pred)
   813  }
   814  
   815  // Filter returns an entql.Where implementation to apply filters on the PageMutation builder.
   816  func (m *PageMutation) Filter() *PageFilter {
   817  	return &PageFilter{m}
   818  }
   819  
   820  // PageFilter provides a generic filtering capability at runtime for PageQuery.
   821  type PageFilter struct {
   822  	predicateAdder
   823  }
   824  
   825  // Where applies the entql predicate on the query filter.
   826  func (f *PageFilter) Where(p entql.P) {
   827  	f.addPredicate(func(s *sql.Selector) {
   828  		if err := schemaGraph.EvalP(schemaGraph.Nodes[2].Type, p, s); err != nil {
   829  			s.AddError(err)
   830  		}
   831  	})
   832  }
   833  
   834  // WhereID applies the entql int predicate on the id field.
   835  func (f *PageFilter) WhereID(p entql.IntP) {
   836  	f.Where(p.Field(page.FieldID))
   837  }
   838  
   839  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
   840  func (f *PageFilter) WhereCreatedAt(p entql.TimeP) {
   841  	f.Where(p.Field(page.FieldCreatedAt))
   842  }
   843  
   844  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
   845  func (f *PageFilter) WhereUpdatedAt(p entql.TimeP) {
   846  	f.Where(p.Field(page.FieldUpdatedAt))
   847  }
   848  
   849  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
   850  func (f *PageFilter) WhereDeletedAt(p entql.TimeP) {
   851  	f.Where(p.Field(page.FieldDeletedAt))
   852  }
   853  
   854  // WhereName applies the entql string predicate on the name field.
   855  func (f *PageFilter) WhereName(p entql.StringP) {
   856  	f.Where(p.Field(page.FieldName))
   857  }
   858  
   859  // WhereSlug applies the entql string predicate on the slug field.
   860  func (f *PageFilter) WhereSlug(p entql.StringP) {
   861  	f.Where(p.Field(page.FieldSlug))
   862  }
   863  
   864  // WhereContent applies the entql string predicate on the content field.
   865  func (f *PageFilter) WhereContent(p entql.StringP) {
   866  	f.Where(p.Field(page.FieldContent))
   867  }
   868  
   869  // WhereContentHTML applies the entql string predicate on the content_html field.
   870  func (f *PageFilter) WhereContentHTML(p entql.StringP) {
   871  	f.Where(p.Field(page.FieldContentHTML))
   872  }
   873  
   874  // WhereDraft applies the entql bool predicate on the draft field.
   875  func (f *PageFilter) WhereDraft(p entql.BoolP) {
   876  	f.Where(p.Field(page.FieldDraft))
   877  }
   878  
   879  // WhereFeaturedImageID applies the entql int predicate on the featured_image_id field.
   880  func (f *PageFilter) WhereFeaturedImageID(p entql.IntP) {
   881  	f.Where(p.Field(page.FieldFeaturedImageID))
   882  }
   883  
   884  // WhereHasFeaturedImage applies a predicate to check if query has an edge featured_image.
   885  func (f *PageFilter) WhereHasFeaturedImage() {
   886  	f.Where(entql.HasEdge("featured_image"))
   887  }
   888  
   889  // WhereHasFeaturedImageWith applies a predicate to check if query has an edge featured_image with a given conditions (other predicates).
   890  func (f *PageFilter) WhereHasFeaturedImageWith(preds ...predicate.File) {
   891  	f.Where(entql.HasEdgeWith("featured_image", sqlgraph.WrapFunc(func(s *sql.Selector) {
   892  		for _, p := range preds {
   893  			p(s)
   894  		}
   895  	})))
   896  }
   897  
   898  // addPredicate implements the predicateAdder interface.
   899  func (pq *PermissionQuery) addPredicate(pred func(s *sql.Selector)) {
   900  	pq.predicates = append(pq.predicates, pred)
   901  }
   902  
   903  // Filter returns a Filter implementation to apply filters on the PermissionQuery builder.
   904  func (pq *PermissionQuery) Filter() *PermissionFilter {
   905  	return &PermissionFilter{pq}
   906  }
   907  
   908  // addPredicate implements the predicateAdder interface.
   909  func (m *PermissionMutation) addPredicate(pred func(s *sql.Selector)) {
   910  	m.predicates = append(m.predicates, pred)
   911  }
   912  
   913  // Filter returns an entql.Where implementation to apply filters on the PermissionMutation builder.
   914  func (m *PermissionMutation) Filter() *PermissionFilter {
   915  	return &PermissionFilter{m}
   916  }
   917  
   918  // PermissionFilter provides a generic filtering capability at runtime for PermissionQuery.
   919  type PermissionFilter struct {
   920  	predicateAdder
   921  }
   922  
   923  // Where applies the entql predicate on the query filter.
   924  func (f *PermissionFilter) Where(p entql.P) {
   925  	f.addPredicate(func(s *sql.Selector) {
   926  		if err := schemaGraph.EvalP(schemaGraph.Nodes[3].Type, p, s); err != nil {
   927  			s.AddError(err)
   928  		}
   929  	})
   930  }
   931  
   932  // WhereID applies the entql int predicate on the id field.
   933  func (f *PermissionFilter) WhereID(p entql.IntP) {
   934  	f.Where(p.Field(permission.FieldID))
   935  }
   936  
   937  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
   938  func (f *PermissionFilter) WhereCreatedAt(p entql.TimeP) {
   939  	f.Where(p.Field(permission.FieldCreatedAt))
   940  }
   941  
   942  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
   943  func (f *PermissionFilter) WhereUpdatedAt(p entql.TimeP) {
   944  	f.Where(p.Field(permission.FieldUpdatedAt))
   945  }
   946  
   947  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
   948  func (f *PermissionFilter) WhereDeletedAt(p entql.TimeP) {
   949  	f.Where(p.Field(permission.FieldDeletedAt))
   950  }
   951  
   952  // WhereRoleID applies the entql int predicate on the role_id field.
   953  func (f *PermissionFilter) WhereRoleID(p entql.IntP) {
   954  	f.Where(p.Field(permission.FieldRoleID))
   955  }
   956  
   957  // WhereAction applies the entql string predicate on the action field.
   958  func (f *PermissionFilter) WhereAction(p entql.StringP) {
   959  	f.Where(p.Field(permission.FieldAction))
   960  }
   961  
   962  // WhereValue applies the entql string predicate on the value field.
   963  func (f *PermissionFilter) WhereValue(p entql.StringP) {
   964  	f.Where(p.Field(permission.FieldValue))
   965  }
   966  
   967  // WhereHasRole applies a predicate to check if query has an edge role.
   968  func (f *PermissionFilter) WhereHasRole() {
   969  	f.Where(entql.HasEdge("role"))
   970  }
   971  
   972  // WhereHasRoleWith applies a predicate to check if query has an edge role with a given conditions (other predicates).
   973  func (f *PermissionFilter) WhereHasRoleWith(preds ...predicate.Role) {
   974  	f.Where(entql.HasEdgeWith("role", sqlgraph.WrapFunc(func(s *sql.Selector) {
   975  		for _, p := range preds {
   976  			p(s)
   977  		}
   978  	})))
   979  }
   980  
   981  // addPredicate implements the predicateAdder interface.
   982  func (pq *PostQuery) addPredicate(pred func(s *sql.Selector)) {
   983  	pq.predicates = append(pq.predicates, pred)
   984  }
   985  
   986  // Filter returns a Filter implementation to apply filters on the PostQuery builder.
   987  func (pq *PostQuery) Filter() *PostFilter {
   988  	return &PostFilter{pq}
   989  }
   990  
   991  // addPredicate implements the predicateAdder interface.
   992  func (m *PostMutation) addPredicate(pred func(s *sql.Selector)) {
   993  	m.predicates = append(m.predicates, pred)
   994  }
   995  
   996  // Filter returns an entql.Where implementation to apply filters on the PostMutation builder.
   997  func (m *PostMutation) Filter() *PostFilter {
   998  	return &PostFilter{m}
   999  }
  1000  
  1001  // PostFilter provides a generic filtering capability at runtime for PostQuery.
  1002  type PostFilter struct {
  1003  	predicateAdder
  1004  }
  1005  
  1006  // Where applies the entql predicate on the query filter.
  1007  func (f *PostFilter) Where(p entql.P) {
  1008  	f.addPredicate(func(s *sql.Selector) {
  1009  		if err := schemaGraph.EvalP(schemaGraph.Nodes[4].Type, p, s); err != nil {
  1010  			s.AddError(err)
  1011  		}
  1012  	})
  1013  }
  1014  
  1015  // WhereID applies the entql int predicate on the id field.
  1016  func (f *PostFilter) WhereID(p entql.IntP) {
  1017  	f.Where(p.Field(post.FieldID))
  1018  }
  1019  
  1020  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
  1021  func (f *PostFilter) WhereCreatedAt(p entql.TimeP) {
  1022  	f.Where(p.Field(post.FieldCreatedAt))
  1023  }
  1024  
  1025  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
  1026  func (f *PostFilter) WhereUpdatedAt(p entql.TimeP) {
  1027  	f.Where(p.Field(post.FieldUpdatedAt))
  1028  }
  1029  
  1030  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
  1031  func (f *PostFilter) WhereDeletedAt(p entql.TimeP) {
  1032  	f.Where(p.Field(post.FieldDeletedAt))
  1033  }
  1034  
  1035  // WhereName applies the entql string predicate on the name field.
  1036  func (f *PostFilter) WhereName(p entql.StringP) {
  1037  	f.Where(p.Field(post.FieldName))
  1038  }
  1039  
  1040  // WhereSlug applies the entql string predicate on the slug field.
  1041  func (f *PostFilter) WhereSlug(p entql.StringP) {
  1042  	f.Where(p.Field(post.FieldSlug))
  1043  }
  1044  
  1045  // WhereDescription applies the entql string predicate on the description field.
  1046  func (f *PostFilter) WhereDescription(p entql.StringP) {
  1047  	f.Where(p.Field(post.FieldDescription))
  1048  }
  1049  
  1050  // WhereContent applies the entql string predicate on the content field.
  1051  func (f *PostFilter) WhereContent(p entql.StringP) {
  1052  	f.Where(p.Field(post.FieldContent))
  1053  }
  1054  
  1055  // WhereContentHTML applies the entql string predicate on the content_html field.
  1056  func (f *PostFilter) WhereContentHTML(p entql.StringP) {
  1057  	f.Where(p.Field(post.FieldContentHTML))
  1058  }
  1059  
  1060  // WhereViewCount applies the entql int64 predicate on the view_count field.
  1061  func (f *PostFilter) WhereViewCount(p entql.Int64P) {
  1062  	f.Where(p.Field(post.FieldViewCount))
  1063  }
  1064  
  1065  // WhereCommentCount applies the entql int64 predicate on the comment_count field.
  1066  func (f *PostFilter) WhereCommentCount(p entql.Int64P) {
  1067  	f.Where(p.Field(post.FieldCommentCount))
  1068  }
  1069  
  1070  // WhereRatingCount applies the entql int64 predicate on the rating_count field.
  1071  func (f *PostFilter) WhereRatingCount(p entql.Int64P) {
  1072  	f.Where(p.Field(post.FieldRatingCount))
  1073  }
  1074  
  1075  // WhereRatingTotal applies the entql int64 predicate on the rating_total field.
  1076  func (f *PostFilter) WhereRatingTotal(p entql.Int64P) {
  1077  	f.Where(p.Field(post.FieldRatingTotal))
  1078  }
  1079  
  1080  // WhereDraft applies the entql bool predicate on the draft field.
  1081  func (f *PostFilter) WhereDraft(p entql.BoolP) {
  1082  	f.Where(p.Field(post.FieldDraft))
  1083  }
  1084  
  1085  // WhereApproved applies the entql bool predicate on the approved field.
  1086  func (f *PostFilter) WhereApproved(p entql.BoolP) {
  1087  	f.Where(p.Field(post.FieldApproved))
  1088  }
  1089  
  1090  // WhereFeaturedImageID applies the entql int predicate on the featured_image_id field.
  1091  func (f *PostFilter) WhereFeaturedImageID(p entql.IntP) {
  1092  	f.Where(p.Field(post.FieldFeaturedImageID))
  1093  }
  1094  
  1095  // WhereUserID applies the entql int predicate on the user_id field.
  1096  func (f *PostFilter) WhereUserID(p entql.IntP) {
  1097  	f.Where(p.Field(post.FieldUserID))
  1098  }
  1099  
  1100  // WhereHasUser applies a predicate to check if query has an edge user.
  1101  func (f *PostFilter) WhereHasUser() {
  1102  	f.Where(entql.HasEdge("user"))
  1103  }
  1104  
  1105  // WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
  1106  func (f *PostFilter) WhereHasUserWith(preds ...predicate.User) {
  1107  	f.Where(entql.HasEdgeWith("user", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1108  		for _, p := range preds {
  1109  			p(s)
  1110  		}
  1111  	})))
  1112  }
  1113  
  1114  // WhereHasTopics applies a predicate to check if query has an edge topics.
  1115  func (f *PostFilter) WhereHasTopics() {
  1116  	f.Where(entql.HasEdge("topics"))
  1117  }
  1118  
  1119  // WhereHasTopicsWith applies a predicate to check if query has an edge topics with a given conditions (other predicates).
  1120  func (f *PostFilter) WhereHasTopicsWith(preds ...predicate.Topic) {
  1121  	f.Where(entql.HasEdgeWith("topics", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1122  		for _, p := range preds {
  1123  			p(s)
  1124  		}
  1125  	})))
  1126  }
  1127  
  1128  // WhereHasFeaturedImage applies a predicate to check if query has an edge featured_image.
  1129  func (f *PostFilter) WhereHasFeaturedImage() {
  1130  	f.Where(entql.HasEdge("featured_image"))
  1131  }
  1132  
  1133  // WhereHasFeaturedImageWith applies a predicate to check if query has an edge featured_image with a given conditions (other predicates).
  1134  func (f *PostFilter) WhereHasFeaturedImageWith(preds ...predicate.File) {
  1135  	f.Where(entql.HasEdgeWith("featured_image", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1136  		for _, p := range preds {
  1137  			p(s)
  1138  		}
  1139  	})))
  1140  }
  1141  
  1142  // WhereHasComments applies a predicate to check if query has an edge comments.
  1143  func (f *PostFilter) WhereHasComments() {
  1144  	f.Where(entql.HasEdge("comments"))
  1145  }
  1146  
  1147  // WhereHasCommentsWith applies a predicate to check if query has an edge comments with a given conditions (other predicates).
  1148  func (f *PostFilter) WhereHasCommentsWith(preds ...predicate.Comment) {
  1149  	f.Where(entql.HasEdgeWith("comments", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1150  		for _, p := range preds {
  1151  			p(s)
  1152  		}
  1153  	})))
  1154  }
  1155  
  1156  // addPredicate implements the predicateAdder interface.
  1157  func (rq *RoleQuery) addPredicate(pred func(s *sql.Selector)) {
  1158  	rq.predicates = append(rq.predicates, pred)
  1159  }
  1160  
  1161  // Filter returns a Filter implementation to apply filters on the RoleQuery builder.
  1162  func (rq *RoleQuery) Filter() *RoleFilter {
  1163  	return &RoleFilter{rq}
  1164  }
  1165  
  1166  // addPredicate implements the predicateAdder interface.
  1167  func (m *RoleMutation) addPredicate(pred func(s *sql.Selector)) {
  1168  	m.predicates = append(m.predicates, pred)
  1169  }
  1170  
  1171  // Filter returns an entql.Where implementation to apply filters on the RoleMutation builder.
  1172  func (m *RoleMutation) Filter() *RoleFilter {
  1173  	return &RoleFilter{m}
  1174  }
  1175  
  1176  // RoleFilter provides a generic filtering capability at runtime for RoleQuery.
  1177  type RoleFilter struct {
  1178  	predicateAdder
  1179  }
  1180  
  1181  // Where applies the entql predicate on the query filter.
  1182  func (f *RoleFilter) Where(p entql.P) {
  1183  	f.addPredicate(func(s *sql.Selector) {
  1184  		if err := schemaGraph.EvalP(schemaGraph.Nodes[5].Type, p, s); err != nil {
  1185  			s.AddError(err)
  1186  		}
  1187  	})
  1188  }
  1189  
  1190  // WhereID applies the entql int predicate on the id field.
  1191  func (f *RoleFilter) WhereID(p entql.IntP) {
  1192  	f.Where(p.Field(role.FieldID))
  1193  }
  1194  
  1195  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
  1196  func (f *RoleFilter) WhereCreatedAt(p entql.TimeP) {
  1197  	f.Where(p.Field(role.FieldCreatedAt))
  1198  }
  1199  
  1200  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
  1201  func (f *RoleFilter) WhereUpdatedAt(p entql.TimeP) {
  1202  	f.Where(p.Field(role.FieldUpdatedAt))
  1203  }
  1204  
  1205  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
  1206  func (f *RoleFilter) WhereDeletedAt(p entql.TimeP) {
  1207  	f.Where(p.Field(role.FieldDeletedAt))
  1208  }
  1209  
  1210  // WhereName applies the entql string predicate on the name field.
  1211  func (f *RoleFilter) WhereName(p entql.StringP) {
  1212  	f.Where(p.Field(role.FieldName))
  1213  }
  1214  
  1215  // WhereDescription applies the entql string predicate on the description field.
  1216  func (f *RoleFilter) WhereDescription(p entql.StringP) {
  1217  	f.Where(p.Field(role.FieldDescription))
  1218  }
  1219  
  1220  // WhereRoot applies the entql bool predicate on the root field.
  1221  func (f *RoleFilter) WhereRoot(p entql.BoolP) {
  1222  	f.Where(p.Field(role.FieldRoot))
  1223  }
  1224  
  1225  // WhereHasPermissions applies a predicate to check if query has an edge permissions.
  1226  func (f *RoleFilter) WhereHasPermissions() {
  1227  	f.Where(entql.HasEdge("permissions"))
  1228  }
  1229  
  1230  // WhereHasPermissionsWith applies a predicate to check if query has an edge permissions with a given conditions (other predicates).
  1231  func (f *RoleFilter) WhereHasPermissionsWith(preds ...predicate.Permission) {
  1232  	f.Where(entql.HasEdgeWith("permissions", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1233  		for _, p := range preds {
  1234  			p(s)
  1235  		}
  1236  	})))
  1237  }
  1238  
  1239  // WhereHasUsers applies a predicate to check if query has an edge users.
  1240  func (f *RoleFilter) WhereHasUsers() {
  1241  	f.Where(entql.HasEdge("users"))
  1242  }
  1243  
  1244  // WhereHasUsersWith applies a predicate to check if query has an edge users with a given conditions (other predicates).
  1245  func (f *RoleFilter) WhereHasUsersWith(preds ...predicate.User) {
  1246  	f.Where(entql.HasEdgeWith("users", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1247  		for _, p := range preds {
  1248  			p(s)
  1249  		}
  1250  	})))
  1251  }
  1252  
  1253  // addPredicate implements the predicateAdder interface.
  1254  func (sq *SettingQuery) addPredicate(pred func(s *sql.Selector)) {
  1255  	sq.predicates = append(sq.predicates, pred)
  1256  }
  1257  
  1258  // Filter returns a Filter implementation to apply filters on the SettingQuery builder.
  1259  func (sq *SettingQuery) Filter() *SettingFilter {
  1260  	return &SettingFilter{sq}
  1261  }
  1262  
  1263  // addPredicate implements the predicateAdder interface.
  1264  func (m *SettingMutation) addPredicate(pred func(s *sql.Selector)) {
  1265  	m.predicates = append(m.predicates, pred)
  1266  }
  1267  
  1268  // Filter returns an entql.Where implementation to apply filters on the SettingMutation builder.
  1269  func (m *SettingMutation) Filter() *SettingFilter {
  1270  	return &SettingFilter{m}
  1271  }
  1272  
  1273  // SettingFilter provides a generic filtering capability at runtime for SettingQuery.
  1274  type SettingFilter struct {
  1275  	predicateAdder
  1276  }
  1277  
  1278  // Where applies the entql predicate on the query filter.
  1279  func (f *SettingFilter) Where(p entql.P) {
  1280  	f.addPredicate(func(s *sql.Selector) {
  1281  		if err := schemaGraph.EvalP(schemaGraph.Nodes[6].Type, p, s); err != nil {
  1282  			s.AddError(err)
  1283  		}
  1284  	})
  1285  }
  1286  
  1287  // WhereID applies the entql int predicate on the id field.
  1288  func (f *SettingFilter) WhereID(p entql.IntP) {
  1289  	f.Where(p.Field(setting.FieldID))
  1290  }
  1291  
  1292  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
  1293  func (f *SettingFilter) WhereCreatedAt(p entql.TimeP) {
  1294  	f.Where(p.Field(setting.FieldCreatedAt))
  1295  }
  1296  
  1297  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
  1298  func (f *SettingFilter) WhereUpdatedAt(p entql.TimeP) {
  1299  	f.Where(p.Field(setting.FieldUpdatedAt))
  1300  }
  1301  
  1302  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
  1303  func (f *SettingFilter) WhereDeletedAt(p entql.TimeP) {
  1304  	f.Where(p.Field(setting.FieldDeletedAt))
  1305  }
  1306  
  1307  // WhereName applies the entql string predicate on the name field.
  1308  func (f *SettingFilter) WhereName(p entql.StringP) {
  1309  	f.Where(p.Field(setting.FieldName))
  1310  }
  1311  
  1312  // WhereValue applies the entql string predicate on the value field.
  1313  func (f *SettingFilter) WhereValue(p entql.StringP) {
  1314  	f.Where(p.Field(setting.FieldValue))
  1315  }
  1316  
  1317  // WhereType applies the entql string predicate on the type field.
  1318  func (f *SettingFilter) WhereType(p entql.StringP) {
  1319  	f.Where(p.Field(setting.FieldType))
  1320  }
  1321  
  1322  // addPredicate implements the predicateAdder interface.
  1323  func (tq *TopicQuery) addPredicate(pred func(s *sql.Selector)) {
  1324  	tq.predicates = append(tq.predicates, pred)
  1325  }
  1326  
  1327  // Filter returns a Filter implementation to apply filters on the TopicQuery builder.
  1328  func (tq *TopicQuery) Filter() *TopicFilter {
  1329  	return &TopicFilter{tq}
  1330  }
  1331  
  1332  // addPredicate implements the predicateAdder interface.
  1333  func (m *TopicMutation) addPredicate(pred func(s *sql.Selector)) {
  1334  	m.predicates = append(m.predicates, pred)
  1335  }
  1336  
  1337  // Filter returns an entql.Where implementation to apply filters on the TopicMutation builder.
  1338  func (m *TopicMutation) Filter() *TopicFilter {
  1339  	return &TopicFilter{m}
  1340  }
  1341  
  1342  // TopicFilter provides a generic filtering capability at runtime for TopicQuery.
  1343  type TopicFilter struct {
  1344  	predicateAdder
  1345  }
  1346  
  1347  // Where applies the entql predicate on the query filter.
  1348  func (f *TopicFilter) Where(p entql.P) {
  1349  	f.addPredicate(func(s *sql.Selector) {
  1350  		if err := schemaGraph.EvalP(schemaGraph.Nodes[7].Type, p, s); err != nil {
  1351  			s.AddError(err)
  1352  		}
  1353  	})
  1354  }
  1355  
  1356  // WhereID applies the entql int predicate on the id field.
  1357  func (f *TopicFilter) WhereID(p entql.IntP) {
  1358  	f.Where(p.Field(topic.FieldID))
  1359  }
  1360  
  1361  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
  1362  func (f *TopicFilter) WhereCreatedAt(p entql.TimeP) {
  1363  	f.Where(p.Field(topic.FieldCreatedAt))
  1364  }
  1365  
  1366  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
  1367  func (f *TopicFilter) WhereUpdatedAt(p entql.TimeP) {
  1368  	f.Where(p.Field(topic.FieldUpdatedAt))
  1369  }
  1370  
  1371  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
  1372  func (f *TopicFilter) WhereDeletedAt(p entql.TimeP) {
  1373  	f.Where(p.Field(topic.FieldDeletedAt))
  1374  }
  1375  
  1376  // WhereName applies the entql string predicate on the name field.
  1377  func (f *TopicFilter) WhereName(p entql.StringP) {
  1378  	f.Where(p.Field(topic.FieldName))
  1379  }
  1380  
  1381  // WhereSlug applies the entql string predicate on the slug field.
  1382  func (f *TopicFilter) WhereSlug(p entql.StringP) {
  1383  	f.Where(p.Field(topic.FieldSlug))
  1384  }
  1385  
  1386  // WhereDescription applies the entql string predicate on the description field.
  1387  func (f *TopicFilter) WhereDescription(p entql.StringP) {
  1388  	f.Where(p.Field(topic.FieldDescription))
  1389  }
  1390  
  1391  // WhereContent applies the entql string predicate on the content field.
  1392  func (f *TopicFilter) WhereContent(p entql.StringP) {
  1393  	f.Where(p.Field(topic.FieldContent))
  1394  }
  1395  
  1396  // WhereContentHTML applies the entql string predicate on the content_html field.
  1397  func (f *TopicFilter) WhereContentHTML(p entql.StringP) {
  1398  	f.Where(p.Field(topic.FieldContentHTML))
  1399  }
  1400  
  1401  // WhereParentID applies the entql int predicate on the parent_id field.
  1402  func (f *TopicFilter) WhereParentID(p entql.IntP) {
  1403  	f.Where(p.Field(topic.FieldParentID))
  1404  }
  1405  
  1406  // WhereHasPosts applies a predicate to check if query has an edge posts.
  1407  func (f *TopicFilter) WhereHasPosts() {
  1408  	f.Where(entql.HasEdge("posts"))
  1409  }
  1410  
  1411  // WhereHasPostsWith applies a predicate to check if query has an edge posts with a given conditions (other predicates).
  1412  func (f *TopicFilter) WhereHasPostsWith(preds ...predicate.Post) {
  1413  	f.Where(entql.HasEdgeWith("posts", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1414  		for _, p := range preds {
  1415  			p(s)
  1416  		}
  1417  	})))
  1418  }
  1419  
  1420  // WhereHasChildren applies a predicate to check if query has an edge children.
  1421  func (f *TopicFilter) WhereHasChildren() {
  1422  	f.Where(entql.HasEdge("children"))
  1423  }
  1424  
  1425  // WhereHasChildrenWith applies a predicate to check if query has an edge children with a given conditions (other predicates).
  1426  func (f *TopicFilter) WhereHasChildrenWith(preds ...predicate.Topic) {
  1427  	f.Where(entql.HasEdgeWith("children", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1428  		for _, p := range preds {
  1429  			p(s)
  1430  		}
  1431  	})))
  1432  }
  1433  
  1434  // WhereHasParent applies a predicate to check if query has an edge parent.
  1435  func (f *TopicFilter) WhereHasParent() {
  1436  	f.Where(entql.HasEdge("parent"))
  1437  }
  1438  
  1439  // WhereHasParentWith applies a predicate to check if query has an edge parent with a given conditions (other predicates).
  1440  func (f *TopicFilter) WhereHasParentWith(preds ...predicate.Topic) {
  1441  	f.Where(entql.HasEdgeWith("parent", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1442  		for _, p := range preds {
  1443  			p(s)
  1444  		}
  1445  	})))
  1446  }
  1447  
  1448  // addPredicate implements the predicateAdder interface.
  1449  func (uq *UserQuery) addPredicate(pred func(s *sql.Selector)) {
  1450  	uq.predicates = append(uq.predicates, pred)
  1451  }
  1452  
  1453  // Filter returns a Filter implementation to apply filters on the UserQuery builder.
  1454  func (uq *UserQuery) Filter() *UserFilter {
  1455  	return &UserFilter{uq}
  1456  }
  1457  
  1458  // addPredicate implements the predicateAdder interface.
  1459  func (m *UserMutation) addPredicate(pred func(s *sql.Selector)) {
  1460  	m.predicates = append(m.predicates, pred)
  1461  }
  1462  
  1463  // Filter returns an entql.Where implementation to apply filters on the UserMutation builder.
  1464  func (m *UserMutation) Filter() *UserFilter {
  1465  	return &UserFilter{m}
  1466  }
  1467  
  1468  // UserFilter provides a generic filtering capability at runtime for UserQuery.
  1469  type UserFilter struct {
  1470  	predicateAdder
  1471  }
  1472  
  1473  // Where applies the entql predicate on the query filter.
  1474  func (f *UserFilter) Where(p entql.P) {
  1475  	f.addPredicate(func(s *sql.Selector) {
  1476  		if err := schemaGraph.EvalP(schemaGraph.Nodes[8].Type, p, s); err != nil {
  1477  			s.AddError(err)
  1478  		}
  1479  	})
  1480  }
  1481  
  1482  // WhereID applies the entql int predicate on the id field.
  1483  func (f *UserFilter) WhereID(p entql.IntP) {
  1484  	f.Where(p.Field(user.FieldID))
  1485  }
  1486  
  1487  // WhereCreatedAt applies the entql time.Time predicate on the created_at field.
  1488  func (f *UserFilter) WhereCreatedAt(p entql.TimeP) {
  1489  	f.Where(p.Field(user.FieldCreatedAt))
  1490  }
  1491  
  1492  // WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
  1493  func (f *UserFilter) WhereUpdatedAt(p entql.TimeP) {
  1494  	f.Where(p.Field(user.FieldUpdatedAt))
  1495  }
  1496  
  1497  // WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
  1498  func (f *UserFilter) WhereDeletedAt(p entql.TimeP) {
  1499  	f.Where(p.Field(user.FieldDeletedAt))
  1500  }
  1501  
  1502  // WhereUsername applies the entql string predicate on the username field.
  1503  func (f *UserFilter) WhereUsername(p entql.StringP) {
  1504  	f.Where(p.Field(user.FieldUsername))
  1505  }
  1506  
  1507  // WhereDisplayName applies the entql string predicate on the display_name field.
  1508  func (f *UserFilter) WhereDisplayName(p entql.StringP) {
  1509  	f.Where(p.Field(user.FieldDisplayName))
  1510  }
  1511  
  1512  // WhereURL applies the entql string predicate on the url field.
  1513  func (f *UserFilter) WhereURL(p entql.StringP) {
  1514  	f.Where(p.Field(user.FieldURL))
  1515  }
  1516  
  1517  // WhereProvider applies the entql string predicate on the provider field.
  1518  func (f *UserFilter) WhereProvider(p entql.StringP) {
  1519  	f.Where(p.Field(user.FieldProvider))
  1520  }
  1521  
  1522  // WhereProviderID applies the entql string predicate on the provider_id field.
  1523  func (f *UserFilter) WhereProviderID(p entql.StringP) {
  1524  	f.Where(p.Field(user.FieldProviderID))
  1525  }
  1526  
  1527  // WhereProviderUsername applies the entql string predicate on the provider_username field.
  1528  func (f *UserFilter) WhereProviderUsername(p entql.StringP) {
  1529  	f.Where(p.Field(user.FieldProviderUsername))
  1530  }
  1531  
  1532  // WhereProviderAvatar applies the entql string predicate on the provider_avatar field.
  1533  func (f *UserFilter) WhereProviderAvatar(p entql.StringP) {
  1534  	f.Where(p.Field(user.FieldProviderAvatar))
  1535  }
  1536  
  1537  // WhereEmail applies the entql string predicate on the email field.
  1538  func (f *UserFilter) WhereEmail(p entql.StringP) {
  1539  	f.Where(p.Field(user.FieldEmail))
  1540  }
  1541  
  1542  // WherePassword applies the entql string predicate on the password field.
  1543  func (f *UserFilter) WherePassword(p entql.StringP) {
  1544  	f.Where(p.Field(user.FieldPassword))
  1545  }
  1546  
  1547  // WhereBio applies the entql string predicate on the bio field.
  1548  func (f *UserFilter) WhereBio(p entql.StringP) {
  1549  	f.Where(p.Field(user.FieldBio))
  1550  }
  1551  
  1552  // WhereBioHTML applies the entql string predicate on the bio_html field.
  1553  func (f *UserFilter) WhereBioHTML(p entql.StringP) {
  1554  	f.Where(p.Field(user.FieldBioHTML))
  1555  }
  1556  
  1557  // WhereActive applies the entql bool predicate on the active field.
  1558  func (f *UserFilter) WhereActive(p entql.BoolP) {
  1559  	f.Where(p.Field(user.FieldActive))
  1560  }
  1561  
  1562  // WhereAvatarImageID applies the entql int predicate on the avatar_image_id field.
  1563  func (f *UserFilter) WhereAvatarImageID(p entql.IntP) {
  1564  	f.Where(p.Field(user.FieldAvatarImageID))
  1565  }
  1566  
  1567  // WhereHasPosts applies a predicate to check if query has an edge posts.
  1568  func (f *UserFilter) WhereHasPosts() {
  1569  	f.Where(entql.HasEdge("posts"))
  1570  }
  1571  
  1572  // WhereHasPostsWith applies a predicate to check if query has an edge posts with a given conditions (other predicates).
  1573  func (f *UserFilter) WhereHasPostsWith(preds ...predicate.Post) {
  1574  	f.Where(entql.HasEdgeWith("posts", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1575  		for _, p := range preds {
  1576  			p(s)
  1577  		}
  1578  	})))
  1579  }
  1580  
  1581  // WhereHasFiles applies a predicate to check if query has an edge files.
  1582  func (f *UserFilter) WhereHasFiles() {
  1583  	f.Where(entql.HasEdge("files"))
  1584  }
  1585  
  1586  // WhereHasFilesWith applies a predicate to check if query has an edge files with a given conditions (other predicates).
  1587  func (f *UserFilter) WhereHasFilesWith(preds ...predicate.File) {
  1588  	f.Where(entql.HasEdgeWith("files", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1589  		for _, p := range preds {
  1590  			p(s)
  1591  		}
  1592  	})))
  1593  }
  1594  
  1595  // WhereHasComments applies a predicate to check if query has an edge comments.
  1596  func (f *UserFilter) WhereHasComments() {
  1597  	f.Where(entql.HasEdge("comments"))
  1598  }
  1599  
  1600  // WhereHasCommentsWith applies a predicate to check if query has an edge comments with a given conditions (other predicates).
  1601  func (f *UserFilter) WhereHasCommentsWith(preds ...predicate.Comment) {
  1602  	f.Where(entql.HasEdgeWith("comments", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1603  		for _, p := range preds {
  1604  			p(s)
  1605  		}
  1606  	})))
  1607  }
  1608  
  1609  // WhereHasRoles applies a predicate to check if query has an edge roles.
  1610  func (f *UserFilter) WhereHasRoles() {
  1611  	f.Where(entql.HasEdge("roles"))
  1612  }
  1613  
  1614  // WhereHasRolesWith applies a predicate to check if query has an edge roles with a given conditions (other predicates).
  1615  func (f *UserFilter) WhereHasRolesWith(preds ...predicate.Role) {
  1616  	f.Where(entql.HasEdgeWith("roles", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1617  		for _, p := range preds {
  1618  			p(s)
  1619  		}
  1620  	})))
  1621  }
  1622  
  1623  // WhereHasAvatarImage applies a predicate to check if query has an edge avatar_image.
  1624  func (f *UserFilter) WhereHasAvatarImage() {
  1625  	f.Where(entql.HasEdge("avatar_image"))
  1626  }
  1627  
  1628  // WhereHasAvatarImageWith applies a predicate to check if query has an edge avatar_image with a given conditions (other predicates).
  1629  func (f *UserFilter) WhereHasAvatarImageWith(preds ...predicate.File) {
  1630  	f.Where(entql.HasEdgeWith("avatar_image", sqlgraph.WrapFunc(func(s *sql.Selector) {
  1631  		for _, p := range preds {
  1632  			p(s)
  1633  		}
  1634  	})))
  1635  }