Eherina\Domain\Expert:
  type: entity
  table: eherina_expert
  id:
    uuid:
      type: string
      unique: true
      id: true
  fields:
    name:
      type: string
      nullable: false
    city:
      type: string
      nullable: false
    type:
      type: string
      nullable: false

  oneToOne:
    account:
      targetEntity: Nordmind\Security\Application\User\Account
      cascade: ['persist', 'remove']
      onDelete: CASCADE
      inversedBy: profile
      joinColumn:
        name: account_uuid
        referencedColumnName: uuid
  oneToMany:
    products:
      targetEntity: Eherina\Domain\Product
      cascade: ['persist', 'remove']
      mappedBy: expert
      orphanRemoval: true

    events:
      targetEntity: Eherina\Domain\Event
      cascade: ['persist', 'remove']
      mappedBy: expert
      orphanRemoval: true
