|
- <?php
-
- namespace backend\modules\api\models;
-
- use Yii;
-
- /**
- * This is the model class for table "opera_tourist_run".
- *
- * @property integer $id
- * @property integer $tourist_id
- * @property integer $create_user_id
- * @property string $create_time
- * @property integer $update_user_id
- * @property string $update_time
- * @property integer $cancel_flag
- * @property integer $is_onsale
- * @property string $run_date
- * @property integer $to_org_id
- * @property integer $limit_total_num
- * @property integer $limit_adult_num
- * @property integer $max_total_num
- * @property integer $max_adult_num
- * @property integer $saled_adult_num
- * @property integer $saled_child_num
- * @property string $adult_price
- * @property string $child_price
- * @property string $diff_price
- * @property string $adult_cost
- * @property string $child_cost
- * @property string $diff_cost
- * @property integer $sale_type
- * @property string $diff_para
- */
- class OperaTouristRun extends \yii\db\ActiveRecord
- {
- const ADULT_CHILD = 11; //成人及儿童票
- const ADULT = 10; //成人
- const CHILD = 01; //儿童票
- const TOURIST_BUS_RES_TYPE = 1; //自由行 巴士识别
- const TOURIST_HOTEL_RES_TYPE = 2; //自由行 酒店识别
- const TOURIST_OPERA_RES_TYPE = 3; //自由行 门票识别
-
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'opera_tourist_run';
- }
-
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['tourist_id', 'create_user_id', 'update_user_id', 'cancel_flag', 'is_onsale', 'to_org_id', 'limit_total_num', 'limit_adult_num', 'max_total_num', 'max_adult_num', 'saled_adult_num', 'saled_child_num', 'sale_type_adult','sale_type_child'], 'integer'],
- [['create_time', 'update_time'], 'safe'],
- [['adult_price', 'child_price', 'diff_price', 'adult_cost', 'child_cost', 'diff_cost', 'diff_para_adult','diff_para_child'], 'number'],
- [['run_date'], 'string', 'max' => 10],
- [['tourist_id', 'to_org_id', 'run_date'], 'unique', 'targetAttribute' => ['tourist_id', 'to_org_id', 'run_date'], 'message' => 'The combination of Tourist ID, Run Date and To Org ID has already been taken.'],
- ];
- }
-
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'tourist_id' => 'Tourist ID',
- 'create_user_id' => 'Create User ID',
- 'create_time' => 'Create Time',
- 'update_user_id' => 'Update User ID',
- 'update_time' => 'Update Time',
- 'cancel_flag' => 'Cancel Flag',
- 'is_onsale' => 'Is Onsale',
- 'run_date' => 'Run Date',
- 'to_org_id' => 'To Org ID',
- 'limit_total_num' => 'Limit Total Num',
- 'limit_adult_num' => 'Limit Adult Num',
- 'max_total_num' => 'Max Total Num',
- 'max_adult_num' => 'Max Adult Num',
- 'saled_adult_num' => 'Saled Adult Num',
- 'saled_child_num' => 'Saled Child Num',
- 'adult_price' => 'Adult Price',
- 'child_price' => 'Child Price',
- 'diff_price' => 'Diff Price',
- 'adult_cost' => 'Adult Cost',
- 'child_cost' => 'Child Cost',
- 'diff_cost' => 'Diff Cost',
- 'sale_type' => 'Sale Type',
- 'diff_para' => 'Diff Para',
- ];
- }
- }
|