| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2017/11/1/001
- * Time: 16:50
- */
- namespace backend\models;
- use Yii;
- use yii\db\ActiveRecord;
- /**
- * Class Notice
- * @package backend\models
- * @property integer $id
- * @property integer $type
- * @property string $title
- * @property string $content
- * @property integer $in_time
- */
- class Notice extends ActiveRecord
- {
- public static function tableName()
- {
- return 'crm_notice';
- }
- /**
- * @return \yii\db\Connection the database connection used by this AR class.
- */
- public static function getDb()
- {
- return Yii::$app->get('dbXcrm');
- }
- public function rules()
- {
- return [
- [['id', 'type', 'in_time'], 'integer'],
- [['title', 'content'], 'required'],
- [['content'], 'string'],
- [['title'], 'string', 'max' => '255'],
- ];
- }
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'type' => '类型',
- 'title' => '标题',
- 'content' => '内容',
- 'in_time' => '发布时间',
- ];
- }
- }
|