123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace backend\models;
- use yii\behaviors\TimestampBehavior;
- use yii\db\Expression;
- /**
- * 队列
- * Class Queue
- * @package backend\models
- */
- class Queue extends \yii\db\ActiveRecord
- {
- const STATUS_YES = 1;
- const STATUS_NO = 0;
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%queue}}';
- }
- /**
- * @inheritdoc
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- //'value' => new Expression('NOW()'),
- 'value' => function() { return time();},
- ],
- ];
- }
- }
|