hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'legal_person_id_card_front_photo_id'); } /** * 法人反面照 * @return \think\model\relation\HasOne */ public function idCardBackPhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'legal_person_id_card_back_photo_id'); } /** * 营业执照 * @return \think\model\relation\HasOne */ public function licensePhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'license_photo_id'); } /** * 结算人正面照 * @return \think\model\relation\HasOne */ public function settlementIdCardFrontPhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'settlement_person_id_card_front_photo_id'); } /** * 结算人正面照 * @return \think\model\relation\HasOne */ public function settlementIdCardBackPhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'settlement_person_id_card_back_photo_id'); } /** * 结算银行卡 * @return \think\model\relation\HasOne */ public function bankCardPhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'bank_card_photo_id'); } /** * 门店照 * @return \think\model\relation\HasOne */ public function storeFrontPhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'store_front_img_url_id'); } /** * 收银台照 * @return \think\model\relation\HasOne */ public function storeCashPhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'store_cash_photo_id'); } /** * 店内环境照 * @return \think\model\relation\HasOne */ public function storeEnvPhoto() { return $this->hasOne('app\\common\\model\\file\\UploadFile', 'file_id', 'store_env_photo_id'); } /** * 详情 */ public static function detailById($where, $with = ['user']) { is_array($where) ? $filter = $where : $filter['auth_id'] = (int)$where; return (new static())->with($with)->find($where); } /** * 生成订单号 */ public function orderNo() { return OrderService::createOrderNo(); } }