# HMS.Entities.User.dcm.yml
HMS\Entities\User:
  type: entity
  table: user
  indexes:
    email_index:
      columns: [ email ]
  gedmo:
    soft_deleteable:
      field_name: deletedAt
      time_aware: false
  id:
    id:
      type: integer
      options:
        unsigned: true
      generator:
        strategy: AUTO
  fields:
    name:
      type: string
    username:
      type: string
      unique: true
    email:
      type: string
      unique: true
    rememberToken:
      column: remember_token
      type: string
      length: 100
      nullable: true
    deletedAt:
      type: datetime
      nullable: true
    createdAt:
      type: datetime
      gedmo:
        timestampable:
          on: create
    updatedAt:
      type: datetime
      gedmo:
        timestampable:
          on: update
  oneToOne:
    profile:
      targetEntity: Profile
      mappedBy: user
      cascade: ["persist"]
  manyToMany:
    roles:
      targetEntity: Role
      joinTable:
        name: role_user
        joinColumns:
          user_id:
            referencedColumnName: id
            onDelete: CASCADE
        inverseJoinColumns:
          role_id:
            referencedColumnName: id
            onDelete: CASCADE


# HMS.Entities.User.dcm.yml
HMS\Entities\User:
  type: entity
  table: user
  indexes:
    email_index:
      columns: [ email ]
  gedmo:
    soft_deleteable:
      field_name: deletedAt
      time_aware: false
  id:
    id:
      type: integer
      options:
        unsigned: true
      generator:
        strategy: AUTO
  fields:
    name:
      type: string
    username:
      type: string
      unique: true
    email:
      type: string
      unique: true
    rememberToken:
      column: remember_token
      type: string
      length: 100
      nullable: true
    deletedAt:
      type: datetime
      nullable: true
    createdAt:
      type: datetime
      gedmo:
        timestampable:
          on: create
    updatedAt:
      type: datetime
      gedmo:
        timestampable:
          on: update
  oneToOne:
    profile:
      targetEntity: Profile
      mappedBy: user
      cascade: ["all"]
  manyToMany:
    roles:
      targetEntity: Role
      joinTable:
        name: role_user
        joinColumns:
          user_id:
            referencedColumnName: id
        inverseJoinColumns:
          role_id:
            referencedColumnName: id


Change persistence and cascading settings for the user entity.
Change persistence and cascading settings for the user entity.
