|
- <?php
-
- namespace backend\modules\motorcade\models;
-
- use Yii;
-
- /**
- * This is the model class for table "base_bus_protocol_fee".
- *
- * @property integer $ID
- * @property string $CREATE_TIME
- * @property integer $CREATE_USER_ID
- * @property string $UPDATE_TIME
- * @property integer $UPDATE_USER_ID
- * @property integer $CANCEL_FLAG
- * @property integer $BUS_ID
- * @property string $COMPANY_NAME
- * @property string $RUN_DATE
- * @property integer $PAY_TYPE
- * @property string $PAY_PRICE
- * @property integer $PAID
- */
- class BusProtocolFee extends \common\models\zModel
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'base_bus_protocol_fee';
- }
-
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['BUS_ID', 'COMPANY_NAME', 'RUN_DATE', 'PAY_TYPE', 'PAY_PRICE'], 'required'],
- [['CREATE_USER_ID', 'UPDATE_USER_ID', 'CANCEL_FLAG', 'BUS_ID', 'PAY_TYPE', 'PAID'], 'integer'],
- [['PAY_PRICE'], 'number'],
- [['CREATE_TIME', 'UPDATE_TIME'], 'string', 'max' => 20],
- [['COMPANY_NAME'], 'string', 'max' => 255],
- [['RUN_DATE'], 'string', 'max' => 12],
- ];
- }
-
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'ID' => 'ID',
- 'CREATE_TIME' => 'Create Time',
- 'CREATE_USER_ID' => 'Create User ID',
- 'UPDATE_TIME' => 'Update Time',
- 'UPDATE_USER_ID' => 'Update User ID',
- 'CANCEL_FLAG' => 'Cancel Flag',
- 'BUS_ID' => 'Bus ID',
- 'COMPANY_NAME' => '车辆所有',
- 'RUN_DATE' => '费用期',
- 'PAY_TYPE' => '结算类型',
- 'PAY_PRICE' => '费用',
- 'PAID' => '是否收取',
- 'BUS_NO' => '车辆'
- ];
- }
-
- public function getBus(){
- return $this->hasOne(BaseBus::className(), ['BUS_ID'=> 'BUS_ID'])->from(BaseBus::tableName(). ' as bus');
- }
- }
|