mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-04-22 10:04:27 +08:00
重构初始化
This commit is contained in:
41
app/model/admin/AdminUser.php
Normal file
41
app/model/admin/AdminUser.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace app\model\admin;
|
||||
|
||||
use app\common\base\BaseModel;
|
||||
|
||||
/**
|
||||
* 管理员账号模型。
|
||||
* 表示后台管理员基础资料,不承载登录 token。
|
||||
*/
|
||||
class AdminUser extends BaseModel
|
||||
{
|
||||
protected $table = 'ma_admin_user';
|
||||
|
||||
protected $fillable = [
|
||||
'username',
|
||||
'password_hash',
|
||||
'real_name',
|
||||
'mobile',
|
||||
'email',
|
||||
'is_super',
|
||||
'status',
|
||||
'last_login_at',
|
||||
'last_login_ip',
|
||||
'remark',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password_hash',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_super' => 'integer',
|
||||
'status' => 'integer',
|
||||
'last_login_at' => 'datetime',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
48
app/model/admin/ChannelDailyStat.php
Normal file
48
app/model/admin/ChannelDailyStat.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace app\model\admin;
|
||||
|
||||
use app\common\base\BaseModel;
|
||||
|
||||
/**
|
||||
* 通道日统计模型。
|
||||
* 用于路由健康度、成功率和耗时统计。
|
||||
*/
|
||||
class ChannelDailyStat extends BaseModel
|
||||
{
|
||||
protected $table = 'ma_channel_daily_stat';
|
||||
|
||||
protected $fillable = [
|
||||
'merchant_id',
|
||||
'merchant_group_id',
|
||||
'channel_id',
|
||||
'stat_date',
|
||||
'pay_success_count',
|
||||
'pay_fail_count',
|
||||
'pay_amount',
|
||||
'refund_count',
|
||||
'refund_amount',
|
||||
'avg_latency_ms',
|
||||
'success_rate_bp',
|
||||
'health_score',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'merchant_id' => 'integer',
|
||||
'merchant_group_id' => 'integer',
|
||||
'channel_id' => 'integer',
|
||||
'pay_success_count' => 'integer',
|
||||
'pay_fail_count' => 'integer',
|
||||
'pay_amount' => 'integer',
|
||||
'refund_count' => 'integer',
|
||||
'refund_amount' => 'integer',
|
||||
'avg_latency_ms' => 'integer',
|
||||
'success_rate_bp' => 'integer',
|
||||
'health_score' => 'integer',
|
||||
'stat_date' => 'date',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
47
app/model/admin/ChannelNotifyLog.php
Normal file
47
app/model/admin/ChannelNotifyLog.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace app\model\admin;
|
||||
|
||||
use app\common\base\BaseModel;
|
||||
|
||||
/**
|
||||
* 渠道通知日志模型。
|
||||
* 用于记录异步通知、查单请求和去重处理结果。
|
||||
*/
|
||||
class ChannelNotifyLog extends BaseModel
|
||||
{
|
||||
protected $table = 'ma_channel_notify_log';
|
||||
|
||||
protected $fillable = [
|
||||
'notify_no',
|
||||
'channel_id',
|
||||
'notify_type',
|
||||
'biz_no',
|
||||
'pay_no',
|
||||
'channel_request_no',
|
||||
'channel_trade_no',
|
||||
'raw_payload',
|
||||
'verify_status',
|
||||
'process_status',
|
||||
'retry_count',
|
||||
'next_retry_at',
|
||||
'last_error',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'raw_payload',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'channel_id' => 'integer',
|
||||
'notify_type' => 'integer',
|
||||
'verify_status' => 'integer',
|
||||
'process_status' => 'integer',
|
||||
'retry_count' => 'integer',
|
||||
'next_retry_at' => 'datetime',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
41
app/model/admin/PayCallbackLog.php
Normal file
41
app/model/admin/PayCallbackLog.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace app\model\admin;
|
||||
|
||||
use app\common\base\BaseModel;
|
||||
|
||||
/**
|
||||
* 支付回调日志模型。
|
||||
* 用于记录同步和异步回调原始报文和处理结果。
|
||||
*/
|
||||
class PayCallbackLog extends BaseModel
|
||||
{
|
||||
protected $table = 'ma_pay_callback_log';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'pay_no',
|
||||
'channel_id',
|
||||
'callback_type',
|
||||
'request_data',
|
||||
'verify_status',
|
||||
'process_status',
|
||||
'process_result',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'request_data',
|
||||
'process_result',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'channel_id' => 'integer',
|
||||
'callback_type' => 'integer',
|
||||
'verify_status' => 'integer',
|
||||
'process_status' => 'integer',
|
||||
'created_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user