00001 <?php
00002
00003
00004
00005
00006 class DAOUsers2userroles extends DataObjectBase {
00007 public $id_user;
00008 public $id_role;
00009
00010
00011
00012 protected function create_table_object() {
00013 return new DBTable(
00014 'users2userroles',
00015 array(
00016 new DBFieldInt('id_user', null, DBFieldInt::UNSIGNED | DBFieldInt::NOT_NULL),
00017 new DBFieldInt('id_role', null, DBFieldInt::UNSIGNED | DBFieldInt::NOT_NULL),
00018 ),
00019 array(
00020 'id_user',
00021 'id_role'
00022 ),
00023 array(
00024 new DBRelation(
00025 'users',
00026 new DBFieldRelation('id_user', 'id')
00027 ),
00028 new DBRelation(
00029 'userroles',
00030 new DBFieldRelation('id_role', 'id')
00031 )
00032 )
00033 );
00034 }
00035 }