24 public static function model($className = __CLASS__)
38 return '{{question}}';
49 array(
'created',
'default',
'value' => AppHelper::mysqlDate()),
50 array(
'id, author_id, text',
'required'),
51 array(
'id',
'length',
'max'=>255),
52 array(
'author_id',
'numerical',
'integerOnly' =>
true),
53 array(
'text',
'safe'),
54 array(
'created',
'type',
'type'=>
'datetime',
'datetimeFormat' =>
'yyyy-MM-dd HH:mm:ss'),
55 array(
'id, author_id, text, created',
'safe',
'on'=>
'search'),
60 public function getAttributeLabel($name)
65 public function relations()
68 'answers' => array(CActiveRecord::HAS_MANY,
'Answer',
'question_id')