mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-09 05:08:17 +08:00
70 lines
2.0 KiB
PHP
70 lines
2.0 KiB
PHP
<?php
|
||
|
||
// +----------------------------------------------------------------------
|
||
// | Payment Plugin for ThinkAdmin
|
||
// +----------------------------------------------------------------------
|
||
// | 版权所有 2022~2024 ThinkAdmin [ thinkadmin.top ]
|
||
// +----------------------------------------------------------------------
|
||
// | 官方网站: https://thinkadmin.top
|
||
// +----------------------------------------------------------------------
|
||
// | 免责声明 ( https://thinkadmin.top/disclaimer )
|
||
// | 会员免费 ( https://thinkadmin.top/vip-introduce )
|
||
// +----------------------------------------------------------------------
|
||
// | gitee 代码仓库:https://gitee.com/zoujingli/think-plugs-payment
|
||
// | github 代码仓库:https://github.com/zoujingli/think-plugs-payment
|
||
// +----------------------------------------------------------------------
|
||
|
||
declare (strict_types=1);
|
||
|
||
namespace plugin\payment\model;
|
||
|
||
use plugin\account\model\Abs;
|
||
use plugin\account\model\PluginAccountUser;
|
||
use think\model\relation\HasOne;
|
||
|
||
/**
|
||
* 用户积分模型
|
||
* @class PluginPaymentIntegral
|
||
* @package plugin\payment\model
|
||
*/
|
||
class PluginPaymentIntegral extends Abs
|
||
{
|
||
/**
|
||
* 关联用户数据
|
||
* @return \think\model\relation\HasOne
|
||
*/
|
||
public function user(): HasOne
|
||
{
|
||
return $this->hasOne(PluginAccountUser::class, 'id', 'unid');
|
||
}
|
||
|
||
/**
|
||
* 格式化输出时间
|
||
* @param mixed $value
|
||
* @return string
|
||
*/
|
||
public function getCancelTimeAttr($value): string
|
||
{
|
||
return format_datetime($value);
|
||
}
|
||
|
||
public function setCancelTimeAttr($value): string
|
||
{
|
||
return $this->setCreateTimeAttr($value);
|
||
}
|
||
|
||
/**
|
||
* 格式化输出时间
|
||
* @param mixed $value
|
||
* @return string
|
||
*/
|
||
public function getUnlockTimeAttr($value): string
|
||
{
|
||
return format_datetime($value);
|
||
}
|
||
|
||
public function setUnlockTimeAttr($value): string
|
||
{
|
||
return $this->setCreateTimeAttr($value);
|
||
}
|
||
} |