00001 <?php
00002 Load::models('notifications');
00003
00004
00005
00006
00007 class DAONotificationsexceptions extends DataObjectCached {
00008 public $id;
00009 public $id_user;
00010 public $source;
00011 public $source_id;
00012
00013
00014
00015
00016 protected function create_table_object() {
00017 return new DBTable(
00018 'notificationsexceptions',
00019 array(
00020 new DBFieldInt('id', null, DBFieldInt::PRIMARY_KEY),
00021 new DBFieldInt('id_user', null, DBFieldInt::FOREIGN_KEY),
00022 new DBFieldText('source', 100, Notifications::SOURCE_APP, DBField::NOT_NULL),
00023 new DBFieldInt('source_id', null, DBFieldInt::UNSIGNED | DBField::NOT_NULL),
00024 ),
00025 'id',
00026 new DBRelation('users', new DBFieldRelation('id_user', 'id'))
00027 );
00028 }
00029
00030 public function get_user() {
00031 return Users::get($this->id_user);
00032 }
00033 }