mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-12 19:16:54 +01:00
48 lines
746 B
PHP
48 lines
746 B
PHP
<?php
|
|
|
|
class {ClassName} extends CActiveRecord
|
|
{
|
|
/**
|
|
* Returns the static model of the specified AR class.
|
|
* @return CActiveRecord the static model class
|
|
*/
|
|
public static function model($className=__CLASS__)
|
|
{
|
|
return parent::model($className);
|
|
}
|
|
|
|
/**
|
|
* @return string the associated database table name
|
|
*/
|
|
public function tableName()
|
|
{
|
|
return '{TableName}';
|
|
}
|
|
|
|
/**
|
|
* @return array validation rules for model attributes.
|
|
*/
|
|
public function rules()
|
|
{
|
|
return array({Rules}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @return array relational rules.
|
|
*/
|
|
public function relations()
|
|
{
|
|
return array(
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @return array customized attribute labels (name=>label)
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return array(
|
|
);
|
|
}
|
|
} |