Files
directus/packages/spec/specs/components/relation.yaml
2020-10-12 14:05:27 -04:00

39 lines
1.1 KiB
YAML

type: object
x-collection: directus_relations
properties:
id:
description: Unique identifier for the relation.
example: 1
type: integer
many_collection:
description: Collection that has the field that holds the foreign key.
example: directus_activity
type: string
many_field:
description: Foreign key. Field that holds the primary key of the related collection.
example: user
type: string
many_primary:
description: The primary key field of the current collection.
example: id
type: string
one_collection:
description: Collection on the _one_ side of the relationship.
example: directus_users
type: string
one_field:
description: Alias column that serves as the _one_ side of the relationship.
example: null
type: string
nullable: true
one_primary:
description: The primary key field of the related collection.
example: id
type: string
junction_field:
description:
Field on the junction table that holds the many field of the related relation.
example: null
type: string
nullable: true