Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

99 righe
3.3 KiB

  1. <?php
  2. namespace backend\modules\api\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "opera_tourist_run".
  6. *
  7. * @property integer $id
  8. * @property integer $tourist_id
  9. * @property integer $create_user_id
  10. * @property string $create_time
  11. * @property integer $update_user_id
  12. * @property string $update_time
  13. * @property integer $cancel_flag
  14. * @property integer $is_onsale
  15. * @property string $run_date
  16. * @property integer $to_org_id
  17. * @property integer $limit_total_num
  18. * @property integer $limit_adult_num
  19. * @property integer $max_total_num
  20. * @property integer $max_adult_num
  21. * @property integer $saled_adult_num
  22. * @property integer $saled_child_num
  23. * @property string $adult_price
  24. * @property string $child_price
  25. * @property string $diff_price
  26. * @property string $adult_cost
  27. * @property string $child_cost
  28. * @property string $diff_cost
  29. * @property integer $sale_type
  30. * @property string $diff_para
  31. */
  32. class OperaTouristRun extends \yii\db\ActiveRecord
  33. {
  34. const ADULT_CHILD = 11; //成人及儿童票
  35. const ADULT = 10; //成人
  36. const CHILD = 01; //儿童票
  37. const TOURIST_BUS_RES_TYPE = 1; //自由行 巴士识别
  38. const TOURIST_HOTEL_RES_TYPE = 2; //自由行 酒店识别
  39. const TOURIST_OPERA_RES_TYPE = 3; //自由行 门票识别
  40. /**
  41. * @inheritdoc
  42. */
  43. public static function tableName()
  44. {
  45. return 'opera_tourist_run';
  46. }
  47. /**
  48. * @inheritdoc
  49. */
  50. public function rules()
  51. {
  52. return [
  53. [['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'],
  54. [['create_time', 'update_time'], 'safe'],
  55. [['adult_price', 'child_price', 'diff_price', 'adult_cost', 'child_cost', 'diff_cost', 'diff_para_adult','diff_para_child'], 'number'],
  56. [['run_date'], 'string', 'max' => 10],
  57. [['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.'],
  58. ];
  59. }
  60. /**
  61. * @inheritdoc
  62. */
  63. public function attributeLabels()
  64. {
  65. return [
  66. 'id' => 'ID',
  67. 'tourist_id' => 'Tourist ID',
  68. 'create_user_id' => 'Create User ID',
  69. 'create_time' => 'Create Time',
  70. 'update_user_id' => 'Update User ID',
  71. 'update_time' => 'Update Time',
  72. 'cancel_flag' => 'Cancel Flag',
  73. 'is_onsale' => 'Is Onsale',
  74. 'run_date' => 'Run Date',
  75. 'to_org_id' => 'To Org ID',
  76. 'limit_total_num' => 'Limit Total Num',
  77. 'limit_adult_num' => 'Limit Adult Num',
  78. 'max_total_num' => 'Max Total Num',
  79. 'max_adult_num' => 'Max Adult Num',
  80. 'saled_adult_num' => 'Saled Adult Num',
  81. 'saled_child_num' => 'Saled Child Num',
  82. 'adult_price' => 'Adult Price',
  83. 'child_price' => 'Child Price',
  84. 'diff_price' => 'Diff Price',
  85. 'adult_cost' => 'Adult Cost',
  86. 'child_cost' => 'Child Cost',
  87. 'diff_cost' => 'Diff Cost',
  88. 'sale_type' => 'Sale Type',
  89. 'diff_para' => 'Diff Para',
  90. ];
  91. }
  92. }