user.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Code generated by entc, DO NOT EDIT.
  2. package user
  3. const (
  4. // Label holds the string label denoting the user type in the database.
  5. Label = "user"
  6. // FieldID holds the string denoting the id field in the database.
  7. FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database.
  8. FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database.
  9. FieldName = "name"
  10. // EdgeCars holds the string denoting the cars edge name in mutations.
  11. EdgeCars = "cars"
  12. // EdgeGroups holds the string denoting the groups edge name in mutations.
  13. EdgeGroups = "groups"
  14. // Table holds the table name of the user in the database.
  15. Table = "users"
  16. // CarsTable is the table the holds the cars relation/edge.
  17. CarsTable = "cars"
  18. // CarsInverseTable is the table name for the Car entity.
  19. // It exists in this package in order to avoid circular dependency with the "car" package.
  20. CarsInverseTable = "cars"
  21. // CarsColumn is the table column denoting the cars relation/edge.
  22. CarsColumn = "user_cars"
  23. // GroupsTable is the table the holds the groups relation/edge. The primary key declared below.
  24. GroupsTable = "group_users"
  25. // GroupsInverseTable is the table name for the Group entity.
  26. // It exists in this package in order to avoid circular dependency with the "group" package.
  27. GroupsInverseTable = "groups"
  28. )
  29. // Columns holds all SQL columns for user fields.
  30. var Columns = []string{
  31. FieldID,
  32. FieldAge,
  33. FieldName,
  34. }
  35. var (
  36. // GroupsPrimaryKey and GroupsColumn2 are the table columns denoting the
  37. // primary key for the groups relation (M2M).
  38. GroupsPrimaryKey = []string{"group_id", "user_id"}
  39. )
  40. var (
  41. // AgeValidator is a validator for the "age" field. It is called by the builders before save.
  42. AgeValidator func(int) error
  43. // DefaultName holds the default value on creation for the name field.
  44. DefaultName string
  45. )