提交其他文件
This commit is contained in:
50
app/common/model/BaseModel.php
Normal file
50
app/common/model/BaseModel.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use app\common\service\FileService;
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* 基础模型
|
||||
* Class BaseModel
|
||||
* @package app\common\model
|
||||
*/
|
||||
class BaseModel extends Model
|
||||
{
|
||||
/**
|
||||
* @notes 公共处理图片,补全路径
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author 张无忌
|
||||
* @date 2021/9/10 11:02
|
||||
*/
|
||||
// public function getImageAttr($value)
|
||||
// {
|
||||
// return trim($value) ? FileService::getFileUrl($value) : '';
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @notes 公共图片处理,去除图片域名
|
||||
// * @param $value
|
||||
// * @return mixed|string
|
||||
// * @author 张无忌
|
||||
// * @date 2021/9/10 11:04
|
||||
// */
|
||||
// public function setImageAttr($value)
|
||||
// {
|
||||
// return trim($value) ? FileService::setFileUrl($value) : '';
|
||||
// }
|
||||
}
|
||||
19
app/common/model/Config.php
Normal file
19
app/common/model/Config.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
class Config extends BaseModel
|
||||
{
|
||||
}
|
||||
80
app/common/model/Crontab.php
Normal file
80
app/common/model/Crontab.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use app\common\enum\CrontabEnum;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 定时任务模型
|
||||
* Class Crontab
|
||||
* @package app\common\model
|
||||
*/
|
||||
class Crontab extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
protected $name = 'dev_crontab';
|
||||
|
||||
|
||||
/**
|
||||
* @notes 类型获取器
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 12:05
|
||||
*/
|
||||
public function getTypeDescAttr($value)
|
||||
{
|
||||
$desc = [
|
||||
CrontabEnum::CRONTAB => '定时任务',
|
||||
CrontabEnum::DAEMON => '守护进程',
|
||||
];
|
||||
return $desc[$value] ?? '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 状态获取器
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 12:06
|
||||
*/
|
||||
public function getStatusDescAttr($value)
|
||||
{
|
||||
$desc = [
|
||||
CrontabEnum::START => '运行',
|
||||
CrontabEnum::STOP => '停止',
|
||||
CrontabEnum::ERROR => '错误',
|
||||
];
|
||||
return $desc[$value] ?? '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 最后执行时间获取器
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 12:06
|
||||
*/
|
||||
public function getLastTimeAttr($value)
|
||||
{
|
||||
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
|
||||
}
|
||||
}
|
||||
20
app/common/model/HotSearch.php
Normal file
20
app/common/model/HotSearch.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
class HotSearch extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
9
app/common/model/OperationLog.php
Normal file
9
app/common/model/OperationLog.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
class OperationLog extends BaseModel
|
||||
{
|
||||
}
|
||||
34
app/common/model/OrderGroup.php
Normal file
34
app/common/model/OrderGroup.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* OrderGroup模型
|
||||
* Class OrderGroup
|
||||
* @package app\common\model
|
||||
*/
|
||||
class OrderGroup extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'order_group';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/OrderStore.php
Normal file
34
app/common/model/OrderStore.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* OrderStore模型
|
||||
* Class OrderStore
|
||||
* @package app\common\model
|
||||
*/
|
||||
class OrderStore extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'order_store';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/StoreUser.php
Normal file
34
app/common/model/StoreUser.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* StoreUser模型
|
||||
* Class StoreUser
|
||||
* @package app\common\model
|
||||
*/
|
||||
class StoreUser extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'store_user';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/StoreUserAccountLog.php
Normal file
34
app/common/model/StoreUserAccountLog.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* StoreUserAccountLog模型
|
||||
* Class StoreUserAccountLog
|
||||
* @package app\common\model
|
||||
*/
|
||||
class StoreUserAccountLog extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'store_user_account_log';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/StoreUserReflect.php
Normal file
34
app/common/model/StoreUserReflect.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* StoreUserReflect模型
|
||||
* Class StoreUserReflect
|
||||
* @package app\common\model
|
||||
*/
|
||||
class StoreUserReflect extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'store_user_reflect';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/TeaStore.php
Normal file
34
app/common/model/TeaStore.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TeaStore模型
|
||||
* Class TeaStore
|
||||
* @package app\common\model
|
||||
*/
|
||||
class TeaStore extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'tea_store';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/TeaStoreReal.php
Normal file
34
app/common/model/TeaStoreReal.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TeaStoreReal模型
|
||||
* Class TeaStoreReal
|
||||
* @package app\common\model
|
||||
*/
|
||||
class TeaStoreReal extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'tea_store_real';
|
||||
|
||||
|
||||
|
||||
}
|
||||
45
app/common/model/TeaStoreRoom.php
Normal file
45
app/common/model/TeaStoreRoom.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TeaStoreRoom模型
|
||||
* Class TeaStoreRoom
|
||||
* @package app\common\model
|
||||
*/
|
||||
class TeaStoreRoom extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'tea_store_room';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 关联店铺包间关联
|
||||
* @return \think\model\relation\HasOne
|
||||
* @author likeadmin
|
||||
* @date 2026/02/01 11:48
|
||||
*/
|
||||
public function 店铺包间关联()
|
||||
{
|
||||
return $this->hasOne(\app\common\model\teastore\TeaStore::class, 'id', 'store_id');
|
||||
}
|
||||
|
||||
}
|
||||
34
app/common/model/TeamasterAccountLog.php
Normal file
34
app/common/model/TeamasterAccountLog.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TeamasterAccountLog模型
|
||||
* Class TeamasterAccountLog
|
||||
* @package app\common\model
|
||||
*/
|
||||
class TeamasterAccountLog extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'teamaster_account_log';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/TeamasterReal.php
Normal file
34
app/common/model/TeamasterReal.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TeamasterReal模型
|
||||
* Class TeamasterReal
|
||||
* @package app\common\model
|
||||
*/
|
||||
class TeamasterReal extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'teamaster_real';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/TeamasterUserReflect.php
Normal file
34
app/common/model/TeamasterUserReflect.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TeamasterUserReflect模型
|
||||
* Class TeamasterUserReflect
|
||||
* @package app\common\model
|
||||
*/
|
||||
class TeamasterUserReflect extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'teamaster_user_reflect';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/Training.php
Normal file
34
app/common/model/Training.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Training模型
|
||||
* Class Training
|
||||
* @package app\common\model
|
||||
*/
|
||||
class Training extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'training';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/UserMember.php
Normal file
34
app/common/model/UserMember.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* UserMember模型
|
||||
* Class UserMember
|
||||
* @package app\common\model
|
||||
*/
|
||||
class UserMember extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'user_member';
|
||||
|
||||
|
||||
|
||||
}
|
||||
34
app/common/model/Wxcode.php
Normal file
34
app/common/model/Wxcode.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Wxcode模型
|
||||
* Class Wxcode
|
||||
* @package app\common\model
|
||||
*/
|
||||
class Wxcode extends BaseModel
|
||||
{
|
||||
|
||||
protected $name = 'wxcode';
|
||||
|
||||
|
||||
|
||||
}
|
||||
10
app/common/model/area/Area.php
Normal file
10
app/common/model/area/Area.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\area;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class Area extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
13
app/common/model/area/City.php
Normal file
13
app/common/model/area/City.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\area;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class City extends BaseModel
|
||||
{
|
||||
public function getArea()
|
||||
{
|
||||
return $this->hasMany('area', 'id', 'city_id');
|
||||
}
|
||||
}
|
||||
112
app/common/model/article/Article.php
Normal file
112
app/common/model/article/Article.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\article;
|
||||
|
||||
use app\common\enum\YesNoEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 资讯管理模型
|
||||
* Class Article
|
||||
* @package app\common\model\article;
|
||||
*/
|
||||
class Article extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
/**
|
||||
* @notes 获取分类名称
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author heshihu
|
||||
* @date 2022/2/22 9:53
|
||||
*/
|
||||
public function getCateNameAttr($value, $data)
|
||||
{
|
||||
return ArticleCate::where('id', $data['cid'])->value('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 浏览量
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @author 段誉
|
||||
* @date 2022/9/15 11:33
|
||||
*/
|
||||
public function getClickAttr($value, $data)
|
||||
{
|
||||
return $data['click_actual'] + $data['click_virtual'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置图片域名
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return array|string|string[]|null
|
||||
* @author 段誉
|
||||
* @date 2022/9/28 10:17
|
||||
*/
|
||||
public function getContentAttr($value, $data)
|
||||
{
|
||||
return get_file_domain($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 清除图片域名
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return array|string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/9/28 10:17
|
||||
*/
|
||||
public function setContentAttr($value, $data)
|
||||
{
|
||||
return clear_file_domain($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取文章详情
|
||||
* @param $id
|
||||
* @return array
|
||||
* @author 段誉
|
||||
* @date 2022/10/20 15:23
|
||||
*/
|
||||
public static function getArticleDetailArr(int $id)
|
||||
{
|
||||
$article = Article::where(['id' => $id, 'is_show' => YesNoEnum::YES])
|
||||
->findOrEmpty();
|
||||
|
||||
if ($article->isEmpty()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// 增加点击量
|
||||
$article->click_actual += 1;
|
||||
$article->save();
|
||||
|
||||
return $article->append(['click'])
|
||||
->hidden(['click_virtual', 'click_actual'])
|
||||
->toArray();
|
||||
}
|
||||
|
||||
}
|
||||
74
app/common/model/article/ArticleCate.php
Normal file
74
app/common/model/article/ArticleCate.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\article;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 资讯分类管理模型
|
||||
* Class ArticleCate
|
||||
* @package app\common\model\article;
|
||||
*/
|
||||
class ArticleCate extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
/**
|
||||
* @notes 关联文章
|
||||
* @return \think\model\relation\HasMany
|
||||
* @author 段誉
|
||||
* @date 2022/10/19 16:59
|
||||
*/
|
||||
public function article()
|
||||
{
|
||||
return $this->hasMany(Article::class, 'cid', 'id');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 状态描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/9/15 11:25
|
||||
*/
|
||||
public function getIsShowDescAttr($value, $data)
|
||||
{
|
||||
return $data['is_show'] ? '启用' : '停用';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 文章数量
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return int
|
||||
* @author 段誉
|
||||
* @date 2022/9/15 11:32
|
||||
*/
|
||||
public function getArticleCountAttr($value, $data)
|
||||
{
|
||||
return Article::where(['cid' => $data['id']])->count('id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
52
app/common/model/article/ArticleCollect.php
Normal file
52
app/common/model/article/ArticleCollect.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\article;
|
||||
|
||||
use app\common\enum\YesNoEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 资讯收藏
|
||||
* Class ArticleCollect
|
||||
* @package app\common\model\article
|
||||
*/
|
||||
class ArticleCollect extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
/**
|
||||
* @notes 是否已收藏文章
|
||||
* @param $userId
|
||||
* @param $articleId
|
||||
* @return bool (true=已收藏, false=未收藏)
|
||||
* @author 段誉
|
||||
* @date 2022/10/20 15:13
|
||||
*/
|
||||
public static function isCollectArticle($userId, $articleId)
|
||||
{
|
||||
$collect = ArticleCollect::where([
|
||||
'user_id' => $userId,
|
||||
'article_id' => $articleId,
|
||||
'status' => YesNoEnum::YES
|
||||
])->findOrEmpty();
|
||||
|
||||
return !$collect->isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
116
app/common/model/auth/Admin.php
Normal file
116
app/common/model/auth/Admin.php
Normal file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\enum\YesNoEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\dept\Dept;
|
||||
use think\model\concern\SoftDelete;
|
||||
use app\common\service\FileService;
|
||||
|
||||
class Admin extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
protected $append = [
|
||||
'role_id',
|
||||
'dept_id',
|
||||
'jobs_id',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 关联角色id
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return array
|
||||
* @author 段誉
|
||||
* @date 2022/11/25 15:00
|
||||
*/
|
||||
public function getRoleIdAttr($value, $data)
|
||||
{
|
||||
return AdminRole::where('admin_id', $data['id'])->column('role_id');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 关联部门id
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return array
|
||||
* @author 段誉
|
||||
* @date 2022/11/25 15:00
|
||||
*/
|
||||
public function getDeptIdAttr($value, $data)
|
||||
{
|
||||
return AdminDept::where('admin_id', $data['id'])->column('dept_id');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 关联岗位id
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return array
|
||||
* @author 段誉
|
||||
* @date 2022/11/25 15:01\
|
||||
*/
|
||||
public function getJobsIdAttr($value, $data)
|
||||
{
|
||||
return AdminJobs::where('admin_id', $data['id'])->column('jobs_id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取禁用状态
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author 令狐冲
|
||||
* @date 2021/7/7 01:25
|
||||
*/
|
||||
public function getDisableDescAttr($value, $data)
|
||||
{
|
||||
return YesNoEnum::getDisableDesc($data['disable']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 最后登录时间获取器 - 格式化:年-月-日 时:分:秒
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author Tab
|
||||
* @date 2021/7/13 11:35
|
||||
*/
|
||||
public function getLoginTimeAttr($value)
|
||||
{
|
||||
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 头像获取器 - 头像路径添加域名
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author Tab
|
||||
* @date 2021/7/13 11:35
|
||||
*/
|
||||
public function getAvatarAttr($value)
|
||||
{
|
||||
return empty($value) ? FileService::getFileUrl(config('project.default_image.admin_avatar')) : FileService::getFileUrl(trim($value, '/'));
|
||||
}
|
||||
|
||||
}
|
||||
32
app/common/model/auth/AdminDept.php
Normal file
32
app/common/model/auth/AdminDept.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class AdminDept extends BaseModel
|
||||
{
|
||||
/**
|
||||
* @notes 删除用户关联部门
|
||||
* @param $adminId
|
||||
* @return bool
|
||||
* @author 段誉
|
||||
* @date 2022/11/25 14:14
|
||||
*/
|
||||
public static function delByUserId($adminId)
|
||||
{
|
||||
return self::where(['admin_id' => $adminId])->delete();
|
||||
}
|
||||
}
|
||||
32
app/common/model/auth/AdminJobs.php
Normal file
32
app/common/model/auth/AdminJobs.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class AdminJobs extends BaseModel
|
||||
{
|
||||
/**
|
||||
* @notes 删除用户关联岗位
|
||||
* @param $adminId
|
||||
* @return bool
|
||||
* @author 段誉
|
||||
* @date 2022/11/25 14:14
|
||||
*/
|
||||
public static function delByUserId($adminId)
|
||||
{
|
||||
return self::where(['admin_id' => $adminId])->delete();
|
||||
}
|
||||
}
|
||||
34
app/common/model/auth/AdminRole.php
Normal file
34
app/common/model/auth/AdminRole.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class AdminRole extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 删除用户关联角色
|
||||
* @param $adminId
|
||||
* @return bool
|
||||
* @author 段誉
|
||||
* @date 2022/11/25 14:14
|
||||
*/
|
||||
public static function delByUserId($adminId)
|
||||
{
|
||||
return self::where(['admin_id' => $adminId])->delete();
|
||||
}
|
||||
|
||||
}
|
||||
32
app/common/model/auth/AdminSession.php
Normal file
32
app/common/model/auth/AdminSession.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class AdminSession extends BaseModel
|
||||
{
|
||||
/**
|
||||
* @notes 关联管理员表
|
||||
* @return \think\model\relation\HasOne
|
||||
* @author 令狐冲
|
||||
* @date 2021/7/5 14:39
|
||||
*/
|
||||
public function admin()
|
||||
{
|
||||
return $this->hasOne(Admin::class, 'id', 'admin_id')
|
||||
->field('id,multipoint_login');
|
||||
}
|
||||
}
|
||||
31
app/common/model/auth/SystemMenu.php
Normal file
31
app/common/model/auth/SystemMenu.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
* 系统菜单
|
||||
* Class SystemMenu
|
||||
* @package app\common\model\auth
|
||||
*/
|
||||
class SystemMenu extends BaseModel
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
43
app/common/model/auth/SystemRole.php
Normal file
43
app/common/model/auth/SystemRole.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 角色模型
|
||||
* Class Role
|
||||
* @package app\common\model
|
||||
*/
|
||||
class SystemRole extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
protected $name = 'system_role';
|
||||
|
||||
/**
|
||||
* @notes 角色与菜单关联关系
|
||||
* @return \think\model\relation\HasMany
|
||||
* @author 段誉
|
||||
* @date 2022/7/6 11:16
|
||||
*/
|
||||
public function roleMenuIndex()
|
||||
{
|
||||
return $this->hasMany(SystemRoleMenu::class, 'role_id');
|
||||
}
|
||||
}
|
||||
30
app/common/model/auth/SystemRoleMenu.php
Normal file
30
app/common/model/auth/SystemRoleMenu.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\model\auth;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
* 角色与菜单权限关系
|
||||
* Class SystemRoleMenu
|
||||
* @package app\common\model\auth
|
||||
*/
|
||||
class SystemRoleMenu extends BaseModel
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
10
app/common/model/carousel/Carousel.php
Normal file
10
app/common/model/carousel/Carousel.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\carousel;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class Carousel extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
28
app/common/model/channel/OfficialAccountReply.php
Normal file
28
app/common/model/channel/OfficialAccountReply.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\channel;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
/**
|
||||
* 微信公众号回复
|
||||
* Class OfficialAccountReply
|
||||
* @package app\common\model\channel
|
||||
*/
|
||||
class OfficialAccountReply extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
28
app/common/model/decorate/DecoratePage.php
Normal file
28
app/common/model/decorate/DecoratePage.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\model\decorate;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
* 装修配置-页面
|
||||
* Class DecorateTabbar
|
||||
* @package app\common\model\decorate
|
||||
*/
|
||||
class DecoratePage extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
63
app/common/model/decorate/DecorateTabbar.php
Normal file
63
app/common/model/decorate/DecorateTabbar.php
Normal file
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\model\decorate;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
|
||||
/**
|
||||
* 装修配置-底部导航
|
||||
* Class DecorateTabbar
|
||||
* @package app\common\model\decorate
|
||||
*/
|
||||
class DecorateTabbar extends BaseModel
|
||||
{
|
||||
// 设置json类型字段
|
||||
protected $json = ['link'];
|
||||
|
||||
// 设置JSON数据返回数组
|
||||
protected $jsonAssoc = true;
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取底部导航列表
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/9/23 12:07
|
||||
*/
|
||||
public static function getTabbarLists()
|
||||
{
|
||||
$tabbar = self::select()->toArray();
|
||||
|
||||
if (empty($tabbar)) {
|
||||
return $tabbar;
|
||||
}
|
||||
|
||||
foreach ($tabbar as &$item) {
|
||||
if (!empty($item['selected'])) {
|
||||
$item['selected'] = FileService::getFileUrl($item['selected']);
|
||||
}
|
||||
if (!empty($item['unselected'])) {
|
||||
$item['unselected'] = FileService::getFileUrl($item['unselected']);
|
||||
}
|
||||
}
|
||||
|
||||
return $tabbar;
|
||||
}
|
||||
}
|
||||
46
app/common/model/dept/Dept.php
Normal file
46
app/common/model/dept/Dept.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\dept;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 部门模型
|
||||
* Class Dept
|
||||
* @package app\common\model\article
|
||||
*/
|
||||
class Dept extends BaseModel
|
||||
{
|
||||
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
/**
|
||||
* @notes 状态描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:03
|
||||
*/
|
||||
public function getStatusDescAttr($value, $data)
|
||||
{
|
||||
return $data['status'] ? '正常' : '停用';
|
||||
}
|
||||
|
||||
}
|
||||
44
app/common/model/dept/Jobs.php
Normal file
44
app/common/model/dept/Jobs.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\dept;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 岗位模型
|
||||
* Class Jobs
|
||||
* @package app\common\model\dept
|
||||
*/
|
||||
class Jobs extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
/**
|
||||
* @notes 状态描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:03
|
||||
*/
|
||||
public function getStatusDescAttr($value, $data)
|
||||
{
|
||||
return $data['status'] ? '正常' : '停用';
|
||||
}
|
||||
}
|
||||
47
app/common/model/dict/DictData.php
Normal file
47
app/common/model/dict/DictData.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\dict;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 字典数据模型
|
||||
* Class DictData
|
||||
* @package app\common\model\dict
|
||||
*/
|
||||
class DictData extends BaseModel
|
||||
{
|
||||
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
/**
|
||||
* @notes 状态描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:31
|
||||
*/
|
||||
public function getStatusDescAttr($value, $data)
|
||||
{
|
||||
return $data['status'] ? '正常' : '停用';
|
||||
}
|
||||
|
||||
}
|
||||
47
app/common/model/dict/DictType.php
Normal file
47
app/common/model/dict/DictType.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\dict;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型模型
|
||||
* Class DictType
|
||||
* @package app\common\model\dict
|
||||
*/
|
||||
class DictType extends BaseModel
|
||||
{
|
||||
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
/**
|
||||
* @notes 状态描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 15:54
|
||||
*/
|
||||
public function getStatusDescAttr($value, $data)
|
||||
{
|
||||
return $data['status'] ? '正常' : '停用';
|
||||
}
|
||||
|
||||
}
|
||||
24
app/common/model/file/File.php
Normal file
24
app/common/model/file/File.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\file;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
class File extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $deleteTime = 'delete_time';
|
||||
}
|
||||
25
app/common/model/file/FileCate.php
Normal file
25
app/common/model/file/FileCate.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\file;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
class FileCate extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $deleteTime = 'delete_time';
|
||||
}
|
||||
47
app/common/model/notice/NoticeRecord.php
Normal file
47
app/common/model/notice/NoticeRecord.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | 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团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | // +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\notice;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 通知记录模型
|
||||
* Class Notice
|
||||
* @package app\common\model
|
||||
*/
|
||||
class NoticeRecord extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
}
|
||||
120
app/common/model/notice/NoticeSetting.php
Normal file
120
app/common/model/notice/NoticeSetting.php
Normal file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\notice;
|
||||
|
||||
|
||||
use app\common\enum\DefaultEnum;
|
||||
use app\common\enum\notice\NoticeEnum;
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class NoticeSetting extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 短信通知状态
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author ljj
|
||||
* @date 2022/2/16 3:22 下午
|
||||
*/
|
||||
public function getSmsStatusDescAttr($value,$data)
|
||||
{
|
||||
if ($data['sms_notice']) {
|
||||
$sms_text = json_decode($data['sms_notice'],true);
|
||||
return DefaultEnum::getEnableDesc($sms_text['status']);
|
||||
}else {
|
||||
return '停用';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 通知类型
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author ljj
|
||||
* @date 2022/2/17 2:50 下午
|
||||
*/
|
||||
public function getTypeDescAttr($value,$data)
|
||||
{
|
||||
return NoticeEnum::getTypeDesc($data['type']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 接收者描述获取器
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author Tab
|
||||
* @date 2021/8/18 16:42
|
||||
*/
|
||||
public function getRecipientDescAttr($value)
|
||||
{
|
||||
$desc = [
|
||||
1 => '买家',
|
||||
2 => '卖家',
|
||||
];
|
||||
return $desc[$value] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 系统通知获取器
|
||||
* @param $value
|
||||
* @return array|mixed
|
||||
* @author Tab
|
||||
* @date 2021/8/18 19:11
|
||||
*/
|
||||
public function getSystemNoticeAttr($value)
|
||||
{
|
||||
return empty($value) ? [] : json_decode($value, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 短信通知获取器
|
||||
* @param $value
|
||||
* @return array|mixed
|
||||
* @author Tab
|
||||
* @date 2021/8/18 19:12
|
||||
*/
|
||||
public function getSmsNoticeAttr($value)
|
||||
{
|
||||
return empty($value) ? [] : json_decode($value, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 公众号通知获取器
|
||||
* @param $value
|
||||
* @return array|mixed
|
||||
* @author Tab
|
||||
* @date 2021/8/18 19:13
|
||||
*/
|
||||
public function getOaNoticeAttr($value)
|
||||
{
|
||||
return empty($value) ? [] : json_decode($value, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 小程序通知获取器
|
||||
* @param $value
|
||||
* @return array|mixed
|
||||
* @author Tab
|
||||
* @date 2021/8/18 19:13
|
||||
*/
|
||||
public function getMnpNoticeAttr($value)
|
||||
{
|
||||
return empty($value) ? [] : json_decode($value, true);
|
||||
}
|
||||
}
|
||||
30
app/common/model/notice/SmsLog.php
Normal file
30
app/common/model/notice/SmsLog.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\notice;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 短信记录模型
|
||||
* Class SmsLog
|
||||
* @package app\common\model
|
||||
*/
|
||||
class SmsLog extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
}
|
||||
10
app/common/model/order/Order.php
Normal file
10
app/common/model/order/Order.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class Order extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderAll.php
Normal file
10
app/common/model/order/OrderAll.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderAll extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderGroup.php
Normal file
10
app/common/model/order/OrderGroup.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderGroup extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderMember.php
Normal file
10
app/common/model/order/OrderMember.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderMember extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
27
app/common/model/order/OrderStore.php
Normal file
27
app/common/model/order/OrderStore.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderStore extends BaseModel
|
||||
{
|
||||
/**
|
||||
* @notes 记录总订单
|
||||
* @author 胥聪
|
||||
* @date 2025/12/20 9:53
|
||||
*/
|
||||
public static function orderAll($table,$type,$order_sn,$store_id,$amount_price,$userId){
|
||||
//$type 0为茶艺师 1为茶室支付 2购买套餐 3购买会员 4充值 5团购退款
|
||||
return OrderAll::create([
|
||||
'user_id'=>$userId,
|
||||
'sn'=>createSn("order_all","sn"),
|
||||
'type'=>$type,
|
||||
'table'=>$table,
|
||||
'source_sn'=>$order_sn,
|
||||
'store_id'=>$store_id,
|
||||
'real_price'=>$amount_price,
|
||||
'dtime'=>date("Y-m-d H:i:s")
|
||||
]);
|
||||
}
|
||||
}
|
||||
10
app/common/model/order/OrderStoreHistory.php
Normal file
10
app/common/model/order/OrderStoreHistory.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderStoreHistory extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderStoreRecharge.php
Normal file
10
app/common/model/order/OrderStoreRecharge.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderStoreRecharge extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderStoreRenew.php
Normal file
10
app/common/model/order/OrderStoreRenew.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderStoreRenew extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderTeamaster.php
Normal file
10
app/common/model/order/OrderTeamaster.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderTeamaster extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderTeamasterLeaf.php
Normal file
10
app/common/model/order/OrderTeamasterLeaf.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderTeamasterLeaf extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/order/OrderTeamasterRenew.php
Normal file
10
app/common/model/order/OrderTeamasterRenew.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\order;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class OrderTeamasterRenew extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/pay/Pay.php
Normal file
10
app/common/model/pay/Pay.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\pay;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class Pay extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
56
app/common/model/pay/PayConfig.php
Normal file
56
app/common/model/pay/PayConfig.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\pay;
|
||||
|
||||
use app\common\enum\PayEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
|
||||
class PayConfig extends BaseModel
|
||||
{
|
||||
protected $name = 'dev_pay_config';
|
||||
|
||||
// 设置json类型字段
|
||||
protected $json = ['config'];
|
||||
|
||||
// 设置JSON数据返回数组
|
||||
protected $jsonAssoc = true;
|
||||
|
||||
/**
|
||||
* @notes 支付图标获取器 - 路径添加域名
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author ljj
|
||||
* @date 2021/7/28 2:12 下午
|
||||
*/
|
||||
public function getIconAttr($value)
|
||||
{
|
||||
return empty($value) ? '' : FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 支付方式名称获取器
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author ljj
|
||||
* @date 2021/7/31 2:24 下午
|
||||
*/
|
||||
public function getPayWayNameAttr($value,$data)
|
||||
{
|
||||
return PayEnum::getPayDesc($data['pay_way']);
|
||||
}
|
||||
}
|
||||
54
app/common/model/pay/PayWay.php
Normal file
54
app/common/model/pay/PayWay.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\pay;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\service\FileService;
|
||||
|
||||
|
||||
class PayWay extends BaseModel
|
||||
{
|
||||
protected $name = 'dev_pay_way';
|
||||
|
||||
public function getIconAttr($value,$data)
|
||||
{
|
||||
return FileService::getFileUrl($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 支付方式名称获取器
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @author ljj
|
||||
* @date 2021/7/28 4:02 下午
|
||||
*/
|
||||
public static function getPayWayNameAttr($value,$data)
|
||||
{
|
||||
return PayConfig::where('id',$data['pay_config_id'])->value('name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 关联支配配置模型
|
||||
* @return \think\model\relation\HasOne
|
||||
* @author ljj
|
||||
* @date 2021/10/11 3:04 下午
|
||||
*/
|
||||
public function payConfig()
|
||||
{
|
||||
return $this->hasOne(PayConfig::class,'id','pay_config_id');
|
||||
}
|
||||
}
|
||||
57
app/common/model/recharge/RechargeOrder.php
Normal file
57
app/common/model/recharge/RechargeOrder.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\recharge;
|
||||
|
||||
use app\common\enum\PayEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 充值订单模型
|
||||
* Class RechargeOrder
|
||||
* @package app\common\model
|
||||
*/
|
||||
class RechargeOrder extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
/**
|
||||
* @notes 支付方式
|
||||
* @param $value
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/23 18:32
|
||||
*/
|
||||
public function getPayWayTextAttr($value, $data)
|
||||
{
|
||||
return PayEnum::getPayDesc($data['pay_way']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 支付状态
|
||||
* @param $value
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/23 18:32
|
||||
*/
|
||||
public function getPayStatusTextAttr($value, $data)
|
||||
{
|
||||
return PayEnum::getPayStatusDesc($data['pay_status']);
|
||||
}
|
||||
}
|
||||
58
app/common/model/refund/RefundLog.php
Normal file
58
app/common/model/refund/RefundLog.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\refund;
|
||||
|
||||
|
||||
use app\common\enum\RefundEnum;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
* 退款日志模型
|
||||
* Class RefundLog
|
||||
* @package app\common\model\refund
|
||||
*/
|
||||
class RefundLog extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 操作人描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return mixed
|
||||
* @author 段誉
|
||||
* @date 2022/12/1 10:55
|
||||
*/
|
||||
public function getHandlerAttr($value, $data)
|
||||
{
|
||||
return Admin::where('id', $data['handle_id'])->value('name');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 退款状态描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/12/1 10:55
|
||||
*/
|
||||
public function getRefundStatusTextAttr($value, $data)
|
||||
{
|
||||
return RefundEnum::getStatusDesc($data['refund_status']);
|
||||
}
|
||||
|
||||
}
|
||||
71
app/common/model/refund/RefundRecord.php
Normal file
71
app/common/model/refund/RefundRecord.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\refund;
|
||||
|
||||
|
||||
use app\common\enum\RefundEnum;
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
* 退款记录模型
|
||||
* Class RefundRecord
|
||||
* @package app\common\model\refund
|
||||
*/
|
||||
class RefundRecord extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 退款类型描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/12/1 10:41
|
||||
*/
|
||||
public function getRefundTypeTextAttr($value, $data)
|
||||
{
|
||||
return RefundEnum::getTypeDesc($data['refund_type']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 退款状态描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/12/1 10:44
|
||||
*/
|
||||
public function getRefundStatusTextAttr($value, $data)
|
||||
{
|
||||
return RefundEnum::getStatusDesc($data['refund_status']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 退款方式描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/12/6 11:08
|
||||
*/
|
||||
public function getRefundWayTextAttr($value, $data)
|
||||
{
|
||||
return RefundEnum::getWayDesc($data['refund_way']);
|
||||
}
|
||||
|
||||
}
|
||||
10
app/common/model/store/Store.php
Normal file
10
app/common/model/store/Store.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\store;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class Store extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/store/StoreMember.php
Normal file
10
app/common/model/store/StoreMember.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\store;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class StoreMember extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
177
app/common/model/store/StoreUser.php
Normal file
177
app/common/model/store/StoreUser.php
Normal file
@ -0,0 +1,177 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\model\store;
|
||||
|
||||
|
||||
use app\common\enum\user\UserEnum;
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\model\user\UserAuth;
|
||||
use app\common\service\FileService;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
/**
|
||||
* 用户模型
|
||||
* Class User
|
||||
* @package app\common\model\user
|
||||
*/
|
||||
class StoreUser extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
/**
|
||||
* @notes 关联用户授权模型
|
||||
* @return \think\model\relation\HasOne
|
||||
* @author 段誉
|
||||
* @date 2022/9/22 16:03
|
||||
*/
|
||||
public function userAuth()
|
||||
{
|
||||
return $this->hasOne(UserAuth::class, 'user_id');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 搜索器-用户信息
|
||||
* @param $query
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @author 段誉
|
||||
* @date 2022/9/22 16:12
|
||||
*/
|
||||
public function searchKeywordAttr($query, $value, $data)
|
||||
{
|
||||
if ($value) {
|
||||
$query->where('sn|nickname|mobile|account', 'like', '%' . $value . '%');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 搜索器-注册来源
|
||||
* @param $query
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @author 段誉
|
||||
* @date 2022/9/22 16:13
|
||||
*/
|
||||
public function searchChannelAttr($query, $value, $data)
|
||||
{
|
||||
if ($value) {
|
||||
$query->where('channel', '=', $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 搜索器-注册时间
|
||||
* @param $query
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @author 段誉
|
||||
* @date 2022/9/22 16:13
|
||||
*/
|
||||
public function searchCreateTimeStartAttr($query, $value, $data)
|
||||
{
|
||||
if ($value) {
|
||||
$query->where('create_time', '>=', strtotime($value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 搜索器-注册时间
|
||||
* @param $query
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @author 段誉
|
||||
* @date 2022/9/22 16:13
|
||||
*/
|
||||
public function searchCreateTimeEndAttr($query, $value, $data)
|
||||
{
|
||||
if ($value) {
|
||||
$query->where('create_time', '<=', strtotime($value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 头像获取器 - 用于头像地址拼接域名
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author Tab
|
||||
* @date 2021/7/17 14:28
|
||||
*/
|
||||
public function getAvatarAttr($value)
|
||||
{
|
||||
return trim($value) ? FileService::getImgUrl($value) : '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取器-性别描述
|
||||
* @param $value
|
||||
* @param $data
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/9/7 15:15
|
||||
*/
|
||||
public function getSexAttr($value, $data)
|
||||
{
|
||||
return UserEnum::getSexDesc($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 登录时间
|
||||
* @param $value
|
||||
* @return string
|
||||
* @author 段誉
|
||||
* @date 2022/9/23 18:15
|
||||
*/
|
||||
public function getLoginTimeAttr($value)
|
||||
{
|
||||
return $value ? date('Y-m-d H:i:s', $value) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 生成用户编码
|
||||
* @param string $prefix
|
||||
* @param int $length
|
||||
* @return string
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/9/16 10:33
|
||||
*/
|
||||
public static function createUserSn($prefix = '', $length = 8)
|
||||
{
|
||||
$rand_str = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$rand_str .= mt_rand(1, 9);
|
||||
}
|
||||
$sn = $prefix . $rand_str;
|
||||
if (StoreUser::where(['sn' => $sn])->find()) {
|
||||
return self::createUserSn($prefix, $length);
|
||||
}
|
||||
return $sn;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
10
app/common/model/store/StoreUserAccountLog.php
Normal file
10
app/common/model/store/StoreUserAccountLog.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\store;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class StoreUserAccountLog extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/store/StoreUserBank.php
Normal file
10
app/common/model/store/StoreUserBank.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\store;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class StoreUserBank extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/store/StoreUserReflect.php
Normal file
10
app/common/model/store/StoreUserReflect.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\store;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class StoreUserReflect extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
28
app/common/model/store/StoreUserSession.php
Normal file
28
app/common/model/store/StoreUserSession.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\model\store;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
/**
|
||||
* 用户登录token信息
|
||||
* Class UserSession
|
||||
* @package app\common\model\user
|
||||
*/
|
||||
class StoreUserSession extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/Tea.php
Normal file
10
app/common/model/teamaster/Tea.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class Tea extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
34
app/common/model/teamaster/Teamaster.php
Normal file
34
app/common/model/teamaster/Teamaster.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\facade\{Db, Config};
|
||||
/**
|
||||
* 茶艺师列表模型
|
||||
* Class TeaUser
|
||||
* @package app\common\model\teamaster
|
||||
*/
|
||||
class Teamaster extends BaseModel
|
||||
{
|
||||
public function teamasterLevel()
|
||||
{
|
||||
return $this->hasMany('teamaster_level', 'id', 'level_id')
|
||||
->field("id,level_name")
|
||||
->where('status', 1);
|
||||
}
|
||||
public static function teamasterReal($real_id)
|
||||
{
|
||||
return TeamasterReal::where('id', $real_id)
|
||||
->field("nickname,interests,gender,age,height,weight")
|
||||
->find();
|
||||
}
|
||||
|
||||
public static function teamasterCollect($teamaster_id,$user_id)
|
||||
{
|
||||
return TeamasterCollect::where('teamaster_id', $teamaster_id)
|
||||
->where("user_id",$user_id)
|
||||
->where("status",1)
|
||||
->find();
|
||||
}
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterAccountLog.php
Normal file
10
app/common/model/teamaster/TeamasterAccountLog.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterAccountLog extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterAddress.php
Normal file
10
app/common/model/teamaster/TeamasterAddress.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterAddress extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterCert.php
Normal file
10
app/common/model/teamaster/TeamasterCert.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterCert extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
15
app/common/model/teamaster/TeamasterCollect.php
Normal file
15
app/common/model/teamaster/TeamasterCollect.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterCollect extends BaseModel
|
||||
{
|
||||
public function teamaster()
|
||||
{
|
||||
return $this->hasMany('teamaster', 'id', 'teamaster_id')
|
||||
->where("del",0)
|
||||
->where('status', 1);
|
||||
}
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterGroupReservation.php
Normal file
10
app/common/model/teamaster/TeamasterGroupReservation.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterGroupReservation extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterInvitation.php
Normal file
10
app/common/model/teamaster/TeamasterInvitation.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterInvitation extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
14
app/common/model/teamaster/TeamasterLabel.php
Normal file
14
app/common/model/teamaster/TeamasterLabel.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
/**
|
||||
* 茶艺师标签模型
|
||||
* Class TeaUser
|
||||
* @package app\common\model\TeamasterLabel
|
||||
*/
|
||||
class TeamasterLabel extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterLeaf.php
Normal file
10
app/common/model/teamaster/TeamasterLeaf.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterLeaf extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
15
app/common/model/teamaster/TeamasterLevel.php
Normal file
15
app/common/model/teamaster/TeamasterLevel.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
/**
|
||||
* 茶艺师等级模型
|
||||
* Class TeaUser
|
||||
* @package app\common\model\TeamasterLevel
|
||||
*/
|
||||
class TeamasterLevel extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterReal.php
Normal file
10
app/common/model/teamaster/TeamasterReal.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterReal extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterSet.php
Normal file
10
app/common/model/teamaster/TeamasterSet.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterSet extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterTipAmount.php
Normal file
10
app/common/model/teamaster/TeamasterTipAmount.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterTipAmount extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterTipAmountLog.php
Normal file
10
app/common/model/teamaster/TeamasterTipAmountLog.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterTipAmountLog extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterUser.php
Normal file
10
app/common/model/teamaster/TeamasterUser.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterUser extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterUserBank.php
Normal file
10
app/common/model/teamaster/TeamasterUserBank.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterUserBank extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterUserReflect.php
Normal file
10
app/common/model/teamaster/TeamasterUserReflect.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterUserReflect extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teamaster/TeamasterUserSession.php
Normal file
10
app/common/model/teamaster/TeamasterUserSession.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teamaster;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeamasterUserSession extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
17
app/common/model/teastore/TeaStore.php
Normal file
17
app/common/model/teastore/TeaStore.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStore extends BaseModel
|
||||
{
|
||||
public static function teaStoreCollect($tea_store_id,$user_id)
|
||||
{
|
||||
return TeaStoreCollect::where('tea_store_id', $tea_store_id)
|
||||
->where("user_id",$user_id)
|
||||
->where("status",1)
|
||||
->find();
|
||||
}
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreCity.php
Normal file
10
app/common/model/teastore/TeaStoreCity.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreCity extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
15
app/common/model/teastore/TeaStoreCollect.php
Normal file
15
app/common/model/teastore/TeaStoreCollect.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreCollect extends BaseModel
|
||||
{
|
||||
public function teaStore()
|
||||
{
|
||||
return $this->hasMany('tea_store', 'id', 'tea_store_id')
|
||||
->where('status', 1)
|
||||
->where('del', 0);
|
||||
}
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreGroup.php
Normal file
10
app/common/model/teastore/TeaStoreGroup.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreGroup extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreHistory.php
Normal file
10
app/common/model/teastore/TeaStoreHistory.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreHistory extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreQual.php
Normal file
10
app/common/model/teastore/TeaStoreQual.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreQual extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreReal.php
Normal file
10
app/common/model/teastore/TeaStoreReal.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreReal extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreRecharge.php
Normal file
10
app/common/model/teastore/TeaStoreRecharge.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreRecharge extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreRoom.php
Normal file
10
app/common/model/teastore/TeaStoreRoom.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreRoom extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreRoomLabel.php
Normal file
10
app/common/model/teastore/TeaStoreRoomLabel.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreRoomLabel extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
10
app/common/model/teastore/TeaStoreRoomTime.php
Normal file
10
app/common/model/teastore/TeaStoreRoomTime.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model\teastore;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
class TeaStoreRoomTime extends BaseModel
|
||||
{
|
||||
|
||||
}
|
||||
39
app/common/model/tools/GenerateColumn.php
Normal file
39
app/common/model/tools/GenerateColumn.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\tools;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
|
||||
|
||||
/**
|
||||
* 代码生成器-数据表字段信息模型
|
||||
* Class GenerateColumn
|
||||
* @package app\common\model\tools
|
||||
*/
|
||||
class GenerateColumn extends BaseModel
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 关联table表
|
||||
* @return \think\model\relation\BelongsTo
|
||||
* @author 段誉
|
||||
* @date 2022/6/15 18:59
|
||||
*/
|
||||
public function generateTable()
|
||||
{
|
||||
return $this->belongsTo(GenerateTable::class, 'id', 'table_id');
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user