App\ContactBundle\Entity\Message:
  type: entity
  repositoryClass: App\ContactBundle\Repository\MessageRepository
  table: contact_message
  id:
    id:
      type: string
      unique: true
      generator:
        strategy: CUSTOM
      customIdGenerator:
        class: Ramsey\Uuid\Doctrine\UuidGenerator
  fields:
    from_name:
      type: string
      length: 255
    from_e_mail:
      type: string
      length: 255
    subject:
      type: string
      length: 255
    date_to_be_sent:
      type: datetime
      nullable: true
    draft:
      type: boolean
      default: false
    text:
      type: text
    html:
      type: text
    host_name:
      type: string
      length: 255
      nullable: true
    priority:
      type: smallint
      nullable: true
    created_by:
      type: string
      length: 255
      nullable: true
    created_at:
      type: datetime
    updated_at:
      type: datetime
  manyToOne:
    message_type:
      targetEntity: MessageType
      joinColumn:
        name: message_type_id
        referencedColumnName: id
    contact_method:
      targetEntity: ContactMethod
      joinColumn:
        name: contact_method_id
        referencedColumnName: id
    contact_reason:
      targetEntity: ContactReason
      joinColumn:
        name: contact_reason_id
        referencedColumnName: id
    from_user:
      targetEntity: App\UserBundle\Entity\UserList
      inversedBy: message
      joinColumn:
        name: from_user_id
        referencedColumnName: id
  oneToMany:
    message_recipient:
      targetEntity: MessageRecipient
      mappedBy: message
      cascade: [ "persist", "remove" ]
    message_attachment:
      targetEntity: MessageAttachment
      mappedBy: message
      cascade: [ "persist", "remove" ]
    message_embedded_image:
      targetEntity: MessageEmbeddedImage
      mappedBy: message
      cascade: [ "persist", "remove" ]
  lifecycleCallbacks:
    prePersist: [ setCreatedAtValue, setUpdatedAtValue ]
    preUpdate: [ setUpdatedAtValue ]