# (c) cavaliba.com


# -------------------------------------------------------------
# user schema
# v4.0
# -------------------------------------------------------------

- classname: _schema
  keyname: user
  _action: init
  is_enabled: yes
  displayname: Users
  _options:
      icon: fa-user-plus
      field_hide_from_edit:
      - last_login
      p_admin: p_user_admin
      p_create: p_user_create
      p_read: p_user_read
      p_update: p_user_update
      p_delete: p_user_delete

  # builtin fields: keyname, displayname, is_enabled

  last_login:
    displayname: Last Login
    order: 5
    dataformat: datetime

  firstname:
    displayname: First Name
    order: 10
    dataformat: string

  lastname:
    displayname: Last Name
    order: 20
    dataformat: string

  description:
    displayname: Description
    order: 25
    dataformat: string

  email:
    displayname: Email
    order: 30
    dataformat: string

  mobile:
    displayname: Mobile
    order: 40
    dataformat: string

  external_id:
    displayname: External ID
    order: 50
    dataformat: string

  manager:
    displayname: Manager
    order: 55
    dataformat: user

  want_notifications:
    displayname: Want Notifications
    order: 60
    dataformat: boolean

  want_24:
    displayname: Want 24h Notifications
    order: 70
    dataformat: boolean

  want_email:
    displayname: Want Email
    order: 80
    dataformat: boolean

  want_sms:
    displayname: Want SMS
    order: 90
    dataformat: boolean

  secondary_email:
    displayname: Secondary Email
    order: 110
    dataformat: string

  secondary_mobile:
    displayname: Secondary Mobile
    order: 120
    dataformat: string



# -------------------------------------------------------------
# ADMIN USER
# -------------------------------------------------------------

# admin: all permissions by default (in code)
- classname: user
  keyname: admin
  displayname: Built-in Global Admin user



