| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace addons\ReservationService\common\models;
- use common\models\base\BaseActiveRecord;
- /**
- * This is the model class for table "qimall_addons_reservation_service_occupy".
- *
- * @property int $id ID
- * @property int $mall_id 商城ID
- * @property int $store_id 门店ID
- * @property int $staff_user_id 技师用户ID
- * @property int $start_at 服务开始时间
- * @property int $end_at 服务结束时间
- * @property int $status 状态0禁用,-1删除,1正常
- * @property int $created_at 创建时间
- * @property int $updated_at 更新时间
- */
- class ReservationServiceOccupy extends BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%addons_reservation_service_occupy}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'store_id', 'staff_user_id', 'start_at', 'end_at', 'status', 'created_at', 'updated_at'], 'integer'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'store_id' => 'Store ID',
- 'staff_user_id' => 'Staff User ID',
- 'start_at' => 'Start At',
- 'end_at' => 'End At',
- 'status' => 'Status',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- ];
- }
- public function getStaff()
- {
- return $this->hasOne(ReservationServiceUser::class, ['user_id' => 'staff_user_id']);
- }
- }
|