App\ContactBundle\Entity\MessageCredit:
  type: entity
  repositoryClass: App\ContactBundle\Repository\MessageCreditRepository
  table: contact_message_credit
  id:
    id:
      type: string
      unique: true
      generator:
        strategy: CUSTOM
      customIdGenerator:
        class: Ramsey\Uuid\Doctrine\UuidGenerator
  fields:
    credit_number:
      type: integer
      options:
          default: 0
    credit_used:
      type: integer
      options:
          default: 0
    credit_remaining:
      type: integer
      options:
          default: 0
    description:
      type: text
      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
    owner:
      targetEntity: App\UserBundle\Entity\UserList
      joinColumn:
        name: owner_id
        referencedColumnName: id
  lifecycleCallbacks:
    prePersist: [ setCreatedAtValue, setUpdatedAtValue ]
    preUpdate: [ setUpdatedAtValue ]