---
detect_relations: true

User:
  tableName: users
  columns:
    id: &ID
      type: integer
      primary: true
      autoincrement: true
      unsigned: true
    name:
      type: string(32)
      notnull: true
    is_locked:
      type: boolean
      default: false
      notnull: true
    login_failures:
      type: integer
      default: 0
      notnull: true
    firstname: string(128)
    lastname: string(128)
    email: string(512)
  indexes:
    nameindex:
      fields: [name]
      type: unique
  actAs:
    Timestampable: true

Group:
  tableName: groups
  columns:
    id: *ID
    name:
      type: string(32)
      notnull: true
  actAs:
    Timestampable: true
