Eherina\Domain\Product:
  type: entity
  table: eherina_product
  id:
    uuid:
      type: string
      unique: true
      id: true
  fields:
    type:
      type: string
      nullable: true
    name:
      type: string
      nullable: false
    description:
      type: text
      nullable: true
    price:
      type: integer
      nullable: true
    numberOfPlaces:
      type: integer
      nullable: true
    status:
      type: string
      nullable: false
    createdAt:
      type: datetime
      nullable: false

  manyToOne:
    expert:
      targetEntity: Eherina\Domain\Expert
      cascade: ['persist']
      inversedBy: products
      joinColumn:
        name: expert_uuid
        referencedColumnName: uuid

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