---
Article:
  actAs:
    I18n:
      fields: [title, body, test_column]
      actAs:
        Sluggable:
          fields: [title]
          uniqueBy: [lang, title]
    Timestampable:
  columns:
    author_id: integer
    is_on_homepage: boolean
    title: string(255)
    body: string(255)
    test_column: string(255)
  relations:
    Author:
      foreignAlias: Articles

CamelCase:
  columns:
    article_id: integer
    testCamelCase: string(255)
  relations:
    Article:
      foreignAlias: camelCase

Author:
  columns:
    name: string(255)

Subscription:
  connection: doctrine2
  columns:
    name: string(255)
    status:
      type: enum
      values: [New, Active, Pending, Expired]

User:
  columns:
    username:
      type: string(255)
      unique: true
    password: string(255)
    test: string(255)
  relations:
    Groups:
      class: Group
      refClass: UserGroup
      foreignAlias: Users
    Permissions:
      class: Permission
      refClass: UserPermission
      foreignAlias: Users

UniqueTest:
  columns:
    unique_test1:
      type: string(255)
      unique: true
    unique_test2: string(255)
    unique_test3: string(255)
    unique_test4: string(255)
  indexes:
    unique_test:
      fields: [unique_test1, unique_test2]
      type: unique
    unique_test2:
      fields:
        unique_test4:
          sorting: ASC
          length: 10
      type: unique


Profile:
  columns:
    user_id: integer
    first_name: string(255)
    last_name: string(255)
  relations:
    User:
      foreignType: one

Group:
  tableName: groups
  columns:
    name: string(255)
  relations:
    Permissions:
      class: Permission
      refClass: GroupPermission
      foreignAlias: Groups

Permission:
  columns:
    name: string(255)

UserGroup:
  columns:
    user_id:
      type: integer
      primary: true
    group_id:
      type: integer
      primary: true

UserPermission:
  columns:
    user_id:
      type: integer
      primary: true
    permission_id:
      type: integer
      primary: true

GroupPermission:
  columns:
    group_id:
      type: integer
      primary: true
    permission_id:
      type: integer
      primary: true