您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

87 行
2.5 KiB

  1. <?php
  2. namespace backend\modules\api\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "opera_tourist_detail".
  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 $res_type
  15. * @property integer $top_res_id
  16. * @property integer $sub_res_id
  17. * @property integer $sub_res_id1
  18. * @property string $select_res_ids
  19. * @property string $select_res_ids1
  20. * @property string $extra_res_info
  21. * @property string $crowd_type
  22. * @property integer $max_num
  23. * @property integer $day_from_start
  24. * @property integer $serial_id
  25. */
  26. class OperaTouristDetail extends \yii\db\ActiveRecord
  27. {
  28. /**
  29. * @inheritdoc
  30. */
  31. public static function tableName()
  32. {
  33. return 'opera_tourist_detail';
  34. }
  35. /**
  36. * @inheritdoc
  37. */
  38. public function rules()
  39. {
  40. return [
  41. [['tourist_id', 'create_user_id', 'update_user_id', 'cancel_flag', 'res_type', 'top_res_id', 'sub_res_id', 'sub_res_id1', 'max_num', 'day_from_start', 'serial_id'], 'integer'],
  42. [['create_time', 'update_time'], 'required'],
  43. [['create_time', 'update_time'], 'safe'],
  44. [['select_res_ids', 'select_res_ids1'], 'string', 'max' => 255],
  45. [['extra_res_info'], 'string', 'max' => 50],
  46. [['crowd_type'], 'string', 'max' => 2],
  47. ];
  48. }
  49. /**
  50. * @inheritdoc
  51. */
  52. public function attributeLabels()
  53. {
  54. return [
  55. 'id' => 'ID',
  56. 'tourist_id' => 'Tourist ID',
  57. 'create_user_id' => 'Create User ID',
  58. 'create_time' => 'Create Time',
  59. 'update_user_id' => 'Update User ID',
  60. 'update_time' => 'Update Time',
  61. 'cancel_flag' => 'Cancel Flag',
  62. 'res_type' => 'Res Type',
  63. 'top_res_id' => 'Top Res ID',
  64. 'sub_res_id' => 'Sub Res ID',
  65. 'sub_res_id1' => 'Sub Res Id1',
  66. 'select_res_ids' => 'Select Res Ids',
  67. 'select_res_ids1' => 'Select Res Ids1',
  68. 'extra_res_info' => 'Extra Res Info',
  69. 'crowd_type' => 'Crowd Type',
  70. 'max_num' => 'Max Num',
  71. 'day_from_start' => 'Day From Start',
  72. 'serial_id' => 'Serial ID',
  73. ];
  74. }
  75. public static function getOperaTouristDetailAll($tourist_id)
  76. {
  77. $data = self::findAll(['tourist_id' => $tourist_id, 'cancel_flag' => 0]);
  78. return $data;
  79. }
  80. }