group.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Code generated by entc, DO NOT EDIT.
  2. package group
  3. const (
  4. // Label holds the string label denoting the group type in the database.
  5. Label = "group"
  6. // FieldID holds the string denoting the id field in the database.
  7. FieldID = "id" // FieldName holds the string denoting the name vertex property in the database.
  8. FieldName = "name"
  9. // EdgeUsers holds the string denoting the users edge name in mutations.
  10. EdgeUsers = "users"
  11. // Table holds the table name of the group in the database.
  12. Table = "groups"
  13. // UsersTable is the table the holds the users relation/edge. The primary key declared below.
  14. UsersTable = "group_users"
  15. // UsersInverseTable is the table name for the User entity.
  16. // It exists in this package in order to avoid circular dependency with the "user" package.
  17. UsersInverseTable = "users"
  18. )
  19. // Columns holds all SQL columns for group fields.
  20. var Columns = []string{
  21. FieldID,
  22. FieldName,
  23. }
  24. var (
  25. // UsersPrimaryKey and UsersColumn2 are the table columns denoting the
  26. // primary key for the users relation (M2M).
  27. UsersPrimaryKey = []string{"group_id", "user_id"}
  28. )
  29. var (
  30. // NameValidator is a validator for the "name" field. It is called by the builders before save.
  31. NameValidator func(string) error
  32. )