This commit is contained in:
sion
2026-04-07 01:05:05 +08:00
parent edad10ff06
commit 5ca1274607
83 changed files with 1561 additions and 1241 deletions

View File

@@ -1,14 +1,14 @@
/// 交易订单模型
/// 交易訂單模型
class OrderTrade {
final int id;
final String orderNo;
final int userId;
final String coinCode;
final int direction; // 1=入, 2=
final int direction; // 1=入, 2=
final String price;
final String quantity;
final String amount;
final int status; // 1=待理, 2=已完成, 3=已取消
final int status; // 1=待理, 2=已完成, 3=已取消
final DateTime? createTime;
final DateTime? updateTime;
@@ -47,13 +47,13 @@ class OrderTrade {
}
/// 方向文字
String get directionText => direction == 1 ? '' : '';
String get directionText => direction == 1 ? '' : '';
/// 状态文字
/// 狀態文字
String get statusText {
switch (status) {
case 1:
return '';
return '';
case 2:
return '已完成';
case 3:
@@ -63,33 +63,33 @@ class OrderTrade {
}
}
/// 是否为买
/// 是否為買
bool get isBuy => direction == 1;
}
/// 充提订单模型
/// 充提訂單模型
class OrderFund {
final int id;
final String orderNo;
final int userId;
final String username;
final int type; // 1=充值, 2=提
final int type; // 1=充值, 2=提
final String amount;
final String? fee; // 手续费
final String? receivableAmount; // 收款
final String? fee; // 手續費
final String? receivableAmount; // 收款
final int status;
// 充值状态: 1=待付款, 2=待确认, 3=已完成, 4=已回, 5=已取消
// 提现状态: 1=待批, 2=已出款, 3=已回, 4=已取消, 5=待财务审
final int? walletId; // 冷包ID(充值)
final String? walletAddress; // 包地址(充值/提)
final String? network; // 提现网络类
final String? withdrawContact; // 提现联系方式
// 充值狀態: 1=待付款, 2=待確認, 3=已完成, 4=已回, 5=已取消
// 提現狀態: 1=待批, 2=已出款, 3=已回, 4=已取消, 5=待財務審
final int? walletId; // 冷包ID(充值)
final String? walletAddress; // 包地址(充值/提)
final String? network; // 提現網絡類
final String? withdrawContact; // 提現聯繫方式
final String remark;
final String? rejectReason;
final String? adminRemark;
final DateTime? createTime;
final DateTime? payTime; // 用户确认打款时间
final DateTime? confirmTime; // 管理员确认时间
final DateTime? payTime; // 用戶確認打款時間
final DateTime? confirmTime; // 管理員確認時間
OrderFund({
required this.id,
@@ -143,72 +143,72 @@ class OrderFund {
);
}
/// 订单类型文字
String get typeText => type == 1 ? '充值' : '';
/// 訂單類型文字
String get typeText => type == 1 ? '充值' : '';
/// 状态文字 (根据类型区分)
/// 狀態文字 (根據類型區分)
String get statusText {
if (type == 1) {
// 充值状态
// 充值狀態
switch (status) {
case 1:
return '待付款';
case 2:
return '确认';
return '確認';
case 3:
return '已完成';
case 4:
return '';
return '';
case 5:
return '已取消';
default:
return '未知';
}
} else {
// 提现状态
// 提現狀態
switch (status) {
case 1:
return '';
return '';
case 2:
return '已出款';
case 3:
return '';
return '';
case 4:
return '已取消';
case 5:
return '财务审';
return '財務審';
default:
return '未知';
}
}
}
/// 是否充值
/// 是否充值
bool get isDeposit => type == 1;
/// 是否可取消
/// 充值: 待付款可取消
/// 提: 仅待审批可取消
/// 充值: 待付款可取消
/// 提: 僅待審批可取消
bool get canCancel {
if (type == 1) {
return status == 1; // 充值待付款
} else {
return status == 1; // 提现待审
return status == 1; // 提現待審
}
}
/// 是否可确认打款 (充值待付款)
/// 是否可確認打款 (充值待付款)
bool get canConfirmPay => type == 1 && status == 1;
}
/// 冷包模型
/// 冷包模型
class ColdWallet {
final int id;
final String name;
final String address;
final String network;
final bool isDefault;
final int status; // 0=禁用, 1=
final int status; // 0=禁用, 1=
final DateTime? createTime;
ColdWallet({