|
- <?php
-
- namespace backend\modules\motorcade\models;
-
- use backend\modules\zzcs\models\BaseUser;
- use Yii;
-
- /**
- * This is the model class for table "bus_action_log".
- *
- * @property integer $id
- * @property string $route
- * @property string $description
- * @property integer $bus_order_id
- * @property integer $type
- * @property string $msg
- * @property string $attributes
- * @property string $values
- * @property string $old_values
- * @property integer $created_at
- * @property integer $user_id
- */
- class BusActionLog extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'bus_action_log';
- }
-
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['description', 'bus_order_id', 'type'], 'required'],
- [['description'], 'string'],
- [['bus_order_id', 'type', 'user_id'], 'integer'],
- [['route', 'attributes', 'values', 'old_values'], 'string', 'max' => 255],
- [['msg'], 'string', 'max' => 1024],
- ];
- }
-
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'route' => 'Route',
- 'description' => 'Description',
- 'bus_order_id' => 'Bus Order ID',
- 'type' => 'Type',
- 'msg' => 'Msg',
- 'attributes' => 'Attributes',
- 'values' => 'Values',
- 'old_values' => 'Old Values',
- 'created_at' => 'Created At',
- 'user_id' => 'User ID',
- ];
- }
-
- public function getUser()
- {
- return $this->hasOne(BaseUser::tableName(), ['ID' => 'user_id']);
- }
- }
|