connection:           propel
defaultIdMethod:      none
package:              lib.model

classes:
  Group:
    tableName:        ab_group
    package:          foo.bar.lib.model
    columns:
      id:
      name:           varchar(50)
      type:           varchar(50)
    inheritance:
      column:         type
      classes:
        tight:        Group_Tight
        loose:        Group_Loose

  User:
    tableName:        cd_user
    isI18N:           true
    i18nTable:        cd_user_i18n
    columns:
      first_name:     { type: varchar, size: 255, default: "Anonymous" }
      last_name:      varchar(50)
      age:            { type: integer, required: true, index: true }
      ab_group_id:
      created_at:

  CdUserI18n:
    tableName:        cd_user_i18n
    columns:
      description:    longvarchar

  EfArticle:
    tableName:       ef_article
    columns:
      title:          { type: longvarchar, required: true, index: unique }
      stripped_title: { type: longvarchar, required: true, primaryKey: true, sequence: my_custom_sequence_name }
      user_id:
      my_group:       { type: integer, foreignTable: ab_group, foreignReference: id, onDelete: setnull }
      my_other_group: { type: integer, foreignTable: ab_group, foreignReference: id, onDelete: setnull }
      created_at:     timestamp
      updated_at:

  Article:
    tableName:        ij_article
    columns:
      title:          varchar(50)
      user_id:        { type: integer }
      created_at:
    foreignKeys:
      -
        foreignTable: cd_user
        onDelete:     cascade
        references:
          - { local: user_id, foreign: id }
    indexes:
      my_index:       [title(10), user_id]
    uniques:
      my_other_index: [created_at(10)]
    behaviors:
      paranoid: { column: deleted_at }
      act_as_nested_set:


  AbGroupI18n:
    tableName:        ab_group_i18n
    columns:
      motto:          longvarchar

  History:
    tableName:      history
    columns:
      id:
      type:         { type: varchar(64) }
    inheritance:
      column:       type
      classes:
        new_user:   History_NewUser
        new_page:   History_NewPage
