Skip to content

Relationship

  • Engine: SQL (Django model / relational table)
  • App: reference
  • Table/Collection: reference_relationship
  • Verbose name: relationship

Holds coaching, medical and management relationships between people Names for this are hard. Review.

Field Type Column/Key Null/Default PK Choices Notes
id AutoField id — PK — —
receiver ForeignKey → Person (FK) receiver_id — — Person receiving service - usually the athlete
provider ForeignKey → Person (FK) provider_id — — Person providing service - coach, doctor, manager
date_from DateField date_from null — Date the relationship started
date_to DateField date_to null — Date the relationship ended
service_type CharField service_type dflt=COACH COACH: Coach; AGENT: Agent; PHYSIO: Physio; DOCTOR: Doctor —
subtype CharField subtype — — e.g. is coach in full control, or just someone whose group t…

Field names link to their fuller explanation below.

Field details

Click a field name in the table above to jump to its explanation. Fields with no help text yet show a prompt, and are the ones to improve by adding a help_text on the model field, then regenerating.

id

  • Engine: SQL
  • Type: AutoField
  • Column/Key: id
  • primary key

No help text yet — add a help_text on the model field and regenerate to fill this in.

receiver

  • Engine: SQL
  • Type: ForeignKey → Person (FK)
  • Column/Key: receiver_id

Person receiving service - usually the athlete

provider

  • Engine: SQL
  • Type: ForeignKey → Person (FK)
  • Column/Key: provider_id

Person providing service - coach, doctor, manager

date_from

  • Engine: SQL
  • Type: DateField
  • Column/Key: date_from
  • nullable

Date the relationship started

date_to

  • Engine: SQL
  • Type: DateField
  • Column/Key: date_to
  • nullable

Date the relationship ended

service_type

  • Engine: SQL
  • Type: CharField
  • Column/Key: service_type
  • default = COACH; choices: COACH: Coach; AGENT: Agent; PHYSIO: Physio; DOCTOR: Doctor

No help text yet — add a help_text on the model field and regenerate to fill this in.

subtype

  • Engine: SQL
  • Type: CharField
  • Column/Key: subtype

e.g. is coach in full control, or just someone whose group they train in?

Generated by docs_models management command for SQL.