User:
  actAs: 
    Timestampable: ~
  columns:
    id:
      type: integer
      primary: true
      autoincrement: true
    manager_id:
      type: integer
    city_id:
      type: integer(10)
    username:
      type: string(128)
      notnull: true
      unique: true
    fname:
      type: string(255)
    iname:
      type: string(255)
    oname:
      type: string(255)
    organization:
      type: string(255)
    city:
      type: string(255)
    inner_id:
      type: string(50)
    client_code: 
      type: string(20)
      notnull: true
    address:
      type: string(255)
    phone_number:
      type: string(100)
    email:
      type: string(128)
      notnull: false
    limit_by_sum:
      type: string(40)
    current_discount:
      type: string(40)
    current_debt:
      type: string(40)
    orders_sum_last_month:
      type: string(40)
    orders_sum_current:
      type: string(40)
    salt: string(128)
    password: string(128)
    open_password: string(255)
    manifest_version: 
      type: integer
      default: 0
    cat_indx:
      type: string(10000)
    cats_with_images:
      type: string(10000)
    recovery_secret:
      type: string(10000)
    is_active:
      type: boolean
      default: 0
    is_super_admin:
      type: boolean
      default: false
    last_login:
      type: timestamp
  relations:
    Manager:
      class: User
      local: manager_id
      foreign: id
  indexes:
    name_idx:
      fields: [username]
      unique: true      
