App\ContentBundle\Entity\Files:
  type: entity
  repositoryClass: App\ContentBundle\Repository\FilesRepository
  table: files
  indexes:
    deleted_idx:
      columns: [ deleted ]
    approved_idx:
      columns: [ approved ]
    is_public_idx:
      columns: [ is_public ]
    is_live_idx:
      columns: [ is_live ]
    is_adult_idx:
      columns: [ is_adult ]
    rental_product_id_idx:
      columns: [ rental_product_id ]
  id:
    id:
      type: string
      unique: true
      generator:
        strategy: CUSTOM
      customIdGenerator:
        class: Ramsey\Uuid\Doctrine\UuidGenerator
  fields:
    original_file_name:
      type: text
    is_cached:
      type: boolean
      options:
        default: false
    approved:
      type: boolean
      options:
        default: false
    border:
      type: string
      length: 50
      options:
        default: 0
    deleted:
      type: boolean
      options:
        default: false
    is_public:
      type: boolean
      options:
        default: false
    is_live:
      type: boolean
      options:
        default: false
    is_adult:
      type: boolean
      options:
        default: false
    rental_product_id:
      type: string
      length: 255
      nullable: true
    created_by:
      type: string
      length: 255
      nullable: true
    created_at:
      type: datetime
    updated_at:
      type: datetime
  oneToMany:
    message_attachment:
      targetEntity: App\ContactBundle\Entity\MessageAttachment
      mappedBy: files
      cascade: [ "persist", "remove" ]
  lifecycleCallbacks:
    prePersist: [ setCreatedAtValue, setUpdatedAtValue ]
    preUpdate: [ setUpdatedAtValue ]