ReservationServiceOccupy.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace addons\ReservationService\common\models;
  3. use common\models\base\BaseActiveRecord;
  4. /**
  5. * This is the model class for table "qimall_addons_reservation_service_occupy".
  6. *
  7. * @property int $id ID
  8. * @property int $mall_id 商城ID
  9. * @property int $store_id 门店ID
  10. * @property int $staff_user_id 技师用户ID
  11. * @property int $start_at 服务开始时间
  12. * @property int $end_at 服务结束时间
  13. * @property int $status 状态0禁用,-1删除,1正常
  14. * @property int $created_at 创建时间
  15. * @property int $updated_at 更新时间
  16. */
  17. class ReservationServiceOccupy extends BaseActiveRecord
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public static function tableName()
  23. {
  24. return '{{%addons_reservation_service_occupy}}';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['mall_id', 'store_id', 'staff_user_id', 'start_at', 'end_at', 'status', 'created_at', 'updated_at'], 'integer'],
  33. ];
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. public function attributeLabels()
  39. {
  40. return [
  41. 'id' => 'ID',
  42. 'mall_id' => 'Mall ID',
  43. 'store_id' => 'Store ID',
  44. 'staff_user_id' => 'Staff User ID',
  45. 'start_at' => 'Start At',
  46. 'end_at' => 'End At',
  47. 'status' => 'Status',
  48. 'created_at' => 'Created At',
  49. 'updated_at' => 'Updated At',
  50. ];
  51. }
  52. public function getStaff()
  53. {
  54. return $this->hasOne(ReservationServiceUser::class, ['user_id' => 'staff_user_id']);
  55. }
  56. }