propel:
  ad_banner:
    id:
    ad_user_profile_id: { type: integer, foreignTable: ad_user_profile, foreignReference: id, required: true, onDelete: cascade }
    name: varchar(50)
    file_name: varchar(255)
  ad_campaign:
    id:
    ad_user_profile_id: { type: integer, foreignTable: ad_user_profile, foreignReference: id, required: true, onDelete: cascade }
    ad_banner_id: { type: integer, foreignTable: ad_banner, foreignReference: id, required: false, onDelete: setnull }
    ad_site_id: { type: integer, foreignTable: ad_site, foreignReference: id, required: false, onDelete: setnull }   
    start_date: date
    end_date: date
  ad_site:
    id:
    ad_user_profile_id: { type: integer, foreignTable: ad_user_profile, foreignReference: id, required: true, onDelete: cascade }
    address: varchar(100)
  ad_tag_word:
    id:
    word: varchar(50)
  ad_site_tag:
    id:
    ad_site_id: { type: integer, foreignTable: ad_site, foreignReference: id, required: true, onDelete: cascade }
    ad_tag_word_id: { type: integer, foreignTable: ad_tag_word, foreignReference: id, required: false, onDelete: setnull }
  ad_user_profile:
    id:
    user_id:     { type: integer, foreignTable: sf_guard_user, foreignReference: id, required: true, onDelete: cascade }
    email: varchar(128)
    banner_hit_taken: {type: integer, default: 0, required: true}
    banner_hit_given: {type: integer, default: 0, required: true}
    banner_show_taken: {type: integer, default: 0, required: true}
    banner_show_given: {type: integer, default: 0, required: true}
  stat_banner: 
    id: 
    ad_banner_id:     { type: integer, foreignTable: ad_banner, foreignReference: id, required: false, onDelete: setnull }
    ad_site_id:     { type: integer, foreignTable: ad_site, foreignReference: id, required: false, onDelete: setnull }
    ad_campaign_id:     { type: integer, foreignTable: ad_campaign, foreignReference: id, required: false, onDelete: setnull }
    times_shown:	integer
    times_clicked:	integer
  stat_site: 
    id: 
    ad_site_id1:     { type: integer, foreignTable: ad_site, foreignReference: id, required: false }
    ad_site_id2:     { type: integer, foreignTable: ad_site, foreignReference: id, required: false }
    times_redirected:	integer