Emgmbh\MarketBundle\Entity\MarketWorkingPlan:
    type: entity
    repositoryClass: MarketWorkingPlanRepository
    id:
        id:
            type: integer
            options:
                unsigned: true
            id: true
            generator:
                strategy: IDENTITY

    fields:
        year:
            type: integer
        month:
            type: integer
        team:
            type: string
        createdAt:
            type: datetime
            gedmo:
                timestampable:
                    on: create

    manyToOne:
        market:
            targetEntity: Emgmbh\MarketBundle\Entity\Market
            inversedBy: workingPlans
            joinColumns:
                market_number:
                    referencedColumnName: number

    oneToMany:
        workers:
            targetEntity: Emgmbh\MarketBundle\Entity\MarketWorkingPlanWorker
            mappedBy: workingPlan
            orderBy: {'id': 'DESC'}
