12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace common\models;
- use Yii;
- /**
- * This is the model class for table "{{%notice}}".
- *
- * @property string $id
- * @property string $title
- * @property integer $sid
- * @property integer $created_at
- * @property integer $release_time
- * @property integer $status
- * @property integer $updated_at
- */
- class Notice extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- const STATUS_DELETED = 0;
- const STATUS_ACTIVE = 10;
- public static function tableName()
- {
- return '{{%notice}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['sid', 'created_at', 'release_time', 'status', 'updated_at'], 'required'],
- [['sid', 'created_at', 'release_time','over_time', 'status', 'updated_at'], 'integer'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'sid' => 'Sid',
- 'created_at' => '创建时间',
- 'release_time' => 'Release Time',
- 'status' => 'Status',
- 'updated_at' => 'Updated At',
- 'over_time'=>'结束时间',
- ];
- }
- //公告信息
- public function getInformation(){
- return $this->hasOne(Information::className(),['id'=>'sid']);
- }
- }
|