---
User:
  tableName: user
  className: User
  columns:
    id:
      type: integer
      autoincrement: true
    username:
      type: string
      length: 11
  relations:
    Groups:
      class: Group
      refClass: UserGroup
      local: user_id
      foreign: group_id
      type: many

UserGroup:
  tableName: user_group
  className: UserGroup
  columns:
    user_id:
      type: int
      length: 11
      primary: true
    group_id:
      type: int
      length: 11
      primary: true
  relations:
    User:
      foreign: id
      local: user_id
      type: one
    Group:
      foreign: id
      local: group_id
      type: one

Group:
  tableName: group
  className: Group
  columns:
    id:
      type: integer
      autoincrement: true
    name:
      type: string
      length: 255
  relations:
    Users:
      class: User
      refClass: UserGroup
      local: group_id
      foreign: user_id
      type: many