App\Entity\TicketMessage:
    type: entity
    table: ticket_message
    indexes:
        idx_ticket_message_ticket:
            columns: [ ticket_id ]
        idx_ticket_message_date:
            columns: [ date_time_creation ]
    fields:
        id:
            id: true
            type: integer
            unsigned: false
            nullable: false
            generator:
                strategy: IDENTITY
        message:
            type: text
            nullable: false
        dateTimeCreation:
            type: datetime
            nullable: false
            column: date_time_creation
    manyToOne:
        ticket:
            targetEntity: Ticket
            inversedBy: messages
            joinColumn:
                name: ticket_id
                referencedColumnName: id
                nullable: false
                onDelete: CASCADE
        utilisateur:
            targetEntity: Utilisateur
            joinColumn:
                name: utilisateur_id
                referencedColumnName: id
                nullable: false
    oneToMany:
        piecesJointes:
            targetEntity: TicketPieceJointe
            mappedBy: ticketMessage
            cascade: [persist, remove]
            orphanRemoval: true
            orderBy:
                dateUpload: ASC
