初始版本
This commit is contained in:
349
server/app/common/model/coach/Coach.php
Executable file
349
server/app/common/model/coach/Coach.php
Executable file
@@ -0,0 +1,349 @@
|
||||
<?php
|
||||
namespace app\common\model\coach;
|
||||
use app\common\enum\coach\CoachEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\Region;
|
||||
use app\common\model\skill\Skill;
|
||||
use app\common\service\FileService;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 技师模型类
|
||||
* Class Coach
|
||||
* @package app\common\model\coach
|
||||
*/
|
||||
class Coach extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
protected $json = ['location'];
|
||||
|
||||
// 设置JSON数据返回数组
|
||||
protected $jsonAssoc = true;
|
||||
|
||||
public function lifePhoto()
|
||||
{
|
||||
return $this->hasMany(CoachLifePhoto::class,'coach_id')->field('uri,coach_id');
|
||||
}
|
||||
|
||||
|
||||
public function goodsIds()
|
||||
{
|
||||
return $this->hasMany(CoachGoodsIndex::class,'coach_id')->field('goods_id,coach_id');
|
||||
}
|
||||
|
||||
|
||||
public function goods()
|
||||
{
|
||||
return $this->hasMany(CoachGoodsIndex::class,'coach_id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工作状态
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 17:48
|
||||
*/
|
||||
public function getWorkStatusDescAttr($value,$data){
|
||||
return CoachEnum::getWorkStatusDesc($data['work_status']);
|
||||
}
|
||||
|
||||
public function getServerStatusDescAttr($value,$data){
|
||||
return CoachEnum::getServerStatusDesc($data['server_status']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 将距离转成km格式显示
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author cjhao
|
||||
* @date 2024/9/3 22:56
|
||||
*/
|
||||
public function getDistanceDescAttr($value,$data){
|
||||
return round($data['distance'],2).'km';
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取审核状态
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 17:48
|
||||
*/
|
||||
public function getAuditStatusDescAttr($value,$data){
|
||||
return CoachEnum::getAuditStatusDesc($data['audit_status']);
|
||||
}
|
||||
|
||||
|
||||
// public function getWorkInfoAttr($value,$data)
|
||||
// {
|
||||
// return [
|
||||
// 'take_order' => 22,
|
||||
// 'total_order' => 22,
|
||||
// ];
|
||||
// }
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getIdCardFrontAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setIdCardFrontAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getIdCardBackAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setIdCardBackAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getPortraitShootingAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setPortraitShootingAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getWorkPhotoAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setWorkPhotoAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getCertificationAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setCertificationAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getHealthCertificateAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setHealthCertificateAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取技能名称
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return void
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 12:49
|
||||
*/
|
||||
public function getSkillDescAttr($value,$data)
|
||||
{
|
||||
return Skill::where(['id'=>$data['skill_id']])->value('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取地区
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 12:52
|
||||
*/
|
||||
public function getRegionDescAttr($value,$data)
|
||||
{
|
||||
if($data){
|
||||
$lists = Region::where(['id'=>[$data['province_id'],$data['city_id'],$data['region_id']]])->column('name');
|
||||
return implode('',$lists);
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取地区
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 12:52
|
||||
*/
|
||||
public function getRegionNameAttr($value,$data)
|
||||
{
|
||||
if($data){
|
||||
return Region::where(['id'=>$data['region_id']])->value('name');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 省份id
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @author cjhao
|
||||
* @date 2024/11/26 14:47
|
||||
*/
|
||||
public function getProvinceNameAttr($value,$data)
|
||||
{
|
||||
if($data){
|
||||
return Region::where(['id'=>$data['province_id']])->value('name');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 省份id
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @author cjhao
|
||||
* @date 2024/11/26 14:47
|
||||
*/
|
||||
public function getCityNameAttr($value,$data)
|
||||
{
|
||||
if($data){
|
||||
return Region::where(['id'=>$data['city_id']])->value('name');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getAvatarAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
}
|
||||
13
server/app/common/model/coach/CoachGoodsIndex.php
Executable file
13
server/app/common/model/coach/CoachGoodsIndex.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
namespace app\common\model\coach;
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
/**
|
||||
* 技师服务关联模型类
|
||||
* Class CoachGoodsIndex
|
||||
* @package app\common\model\coach
|
||||
*/
|
||||
class CoachGoodsIndex extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
39
server/app/common/model/coach/CoachLifePhoto.php
Executable file
39
server/app/common/model/coach/CoachLifePhoto.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
namespace app\common\model\coach;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
/**
|
||||
* 技师生活照模型类
|
||||
* Class CoachLifePhoto
|
||||
* @package app\common\model\coach
|
||||
*/
|
||||
class CoachLifePhoto extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getUriAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setUriAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
}
|
||||
15
server/app/common/model/coach/CoachServerTime.php
Executable file
15
server/app/common/model/coach/CoachServerTime.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace app\common\model\coach;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
/**
|
||||
* 技师服务时间
|
||||
* Class UserCoach
|
||||
* @package app\common\model\coach
|
||||
*/
|
||||
class CoachServerTime extends BaseModel
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
336
server/app/common/model/coach/CoachUpdate.php
Executable file
336
server/app/common/model/coach/CoachUpdate.php
Executable file
@@ -0,0 +1,336 @@
|
||||
<?php
|
||||
namespace app\common\model\coach;
|
||||
use app\common\enum\coach\CoachEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\goods\Goods;
|
||||
use app\common\model\Region;
|
||||
use app\common\model\skill\Skill;
|
||||
use app\common\service\FileService;
|
||||
|
||||
/**
|
||||
* 技师更新模型类
|
||||
* Class CoachUpdate
|
||||
* @package app\common\model\coach
|
||||
*/
|
||||
class CoachUpdate extends BaseModel
|
||||
{
|
||||
/**
|
||||
* @notes 获取生活照
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string[]
|
||||
* @author cjhao
|
||||
* @date 2024/8/28 10:43
|
||||
*/
|
||||
public function getLifePhotoAttr($value,$data)
|
||||
{
|
||||
$lists = explode(',',$value);
|
||||
foreach ($lists as $key => $photo){
|
||||
$lists[$key] = FileService::getFileUrl($photo);
|
||||
}
|
||||
return $lists;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取服务ids
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string[]
|
||||
* @author cjhao
|
||||
* @date 2024/8/28 11:38
|
||||
*/
|
||||
public function getGoodsIdsAttr($value,$data){
|
||||
return explode(',',$value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author cjhao
|
||||
* @date 2024/8/28 10:50
|
||||
*/
|
||||
public function getGoodsListsAttr($value,$data){
|
||||
$goodsLists = Goods::where(['id'=>explode(',',$data['goods_ids'])])
|
||||
->field('id,name,image')
|
||||
->select()
|
||||
->toArray();
|
||||
return $goodsLists;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取工作状态
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 17:48
|
||||
*/
|
||||
public function getWorkStatusDescAttr($value,$data){
|
||||
return CoachEnum::getWorkStatusDesc($data['work_status']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取审核状态
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 17:48
|
||||
*/
|
||||
public function getAuditStatusDescAttr($value,$data){
|
||||
return CoachEnum::getAuditStatusDesc($data['audit_status']);
|
||||
}
|
||||
|
||||
|
||||
public function getWorkInfoAttr($value,$data)
|
||||
{
|
||||
return [
|
||||
'take_order' => 22,
|
||||
'total_order' => 22,
|
||||
];
|
||||
}
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getIdCardFrontAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setIdCardFrontAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getIdCardBackAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setIdCardBackAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getPortraitShootingAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setPortraitShootingAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getWorkPhotoAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setWorkPhotoAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getCertificationAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setCertificationAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getHealthCertificateAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setHealthCertificateAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取技能名称
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return void
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 12:49
|
||||
*/
|
||||
public function getSkillDescAttr($value,$data)
|
||||
{
|
||||
return Skill::where(['id'=>$data['skill_id']])->value('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取地区
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 12:52
|
||||
*/
|
||||
public function getRegionDescAttr($value,$data)
|
||||
{
|
||||
$regionLists = Region::where(['id'=>[$data['province_id'],$data['city_id'],$data['region_id']]])->column('name');
|
||||
return implode('',$regionLists);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取地区
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 12:52
|
||||
*/
|
||||
public function getRegionNameAttr($value,$data)
|
||||
{
|
||||
return Region::where(['id'=>$data['region_id']])->value('name');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 省份id
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @author cjhao
|
||||
* @date 2024/11/26 14:47
|
||||
*/
|
||||
public function getProvinceNameAttr($value,$data)
|
||||
{
|
||||
return Region::where(['id'=>$data['province_id']])->value('name');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 省份id
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @author cjhao
|
||||
* @date 2024/11/26 14:47
|
||||
*/
|
||||
public function getCityNameAttr($value,$data)
|
||||
{
|
||||
return Region::where(['id'=>$data['city_id']])->value('name');
|
||||
}
|
||||
|
||||
}
|
||||
43
server/app/common/model/coach/CoachUser.php
Executable file
43
server/app/common/model/coach/CoachUser.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
namespace app\common\model\coach;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
/**
|
||||
* 技师账号逻辑类
|
||||
* Class UserCoach
|
||||
* @package app\common\model\coach
|
||||
*/
|
||||
class CoachUser extends BaseModel
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 去掉图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function setAvatarAttr($value,$data)
|
||||
{
|
||||
return FileService::setFileUrl($value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 补全图片路径
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2022/2/17 6:11 下午
|
||||
*/
|
||||
public function getAvatarAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
}
|
||||
28
server/app/common/model/coach/CoachUserSession.php
Executable file
28
server/app/common/model/coach/CoachUserSession.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\coach;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class CoachUserSession extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
16
server/app/common/model/coach/Collect.php
Executable file
16
server/app/common/model/coach/Collect.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace app\common\model\coach;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
/**
|
||||
* 技师收藏模型类
|
||||
* Class CoachCollect
|
||||
* @package app\common\model\coach
|
||||
*/
|
||||
class Collect extends BaseModel
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user