. /** * Data class to record user prefs for polls * * @category PollPlugin * @package GNUsocial * @author Brion Vibber * @author Evan Prodromou * @copyright 2012, StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ defined('GNUSOCIAL') || die(); /** * For storing the poll prefs * * @copyright 2012, StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later * * @see DB_DataObject */ class User_poll_prefs extends Managed_DataObject { public $__table = 'user_poll_prefs'; // table name public $user_id; // int id public $hide_responses; // bool public $created; // datetime public $modified; // timestamp /** * The One True Thingy that must be defined and declared. */ public static function schemaDef() { return array( 'description' => 'Record of user preferences for polls', 'fields' => array( 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user id'), 'hide_responses' => array('type' => 'bool', 'default' => false, 'description' => 'Hide all poll responses'), 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'), 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), ), 'primary key' => array('user_id') ); } }