init
This commit is contained in:
commit
295b4058be
243 files changed
+19832
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'base_api_models.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceBase<T> {
|
||||
String? msg;
|
||||
int? code;
|
||||
dynamic data;
|
||||
|
||||
ServiceBase({
|
||||
this.msg,
|
||||
this.code,
|
||||
this.data,
|
||||
});
|
||||
|
||||
factory ServiceBase.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceBaseFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceBaseToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceListBase<T> {
|
||||
String? msg;
|
||||
int? code;
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
List<T>? data;
|
||||
|
||||
ServiceListBase({
|
||||
this.msg,
|
||||
this.code,
|
||||
this.data,
|
||||
});
|
||||
|
||||
factory ServiceListBase.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceListBaseFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceListBaseToJson(this);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'base_api_models.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ServiceBase<T> _$ServiceBaseFromJson<T>(Map<String, dynamic> json) =>
|
||||
ServiceBase<T>(
|
||||
msg: json['msg'] as String?,
|
||||
code: (json['code'] as num?)?.toInt(),
|
||||
data: json['data'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceBaseToJson<T>(ServiceBase<T> instance) =>
|
||||
<String, dynamic>{
|
||||
'msg': instance.msg,
|
||||
'code': instance.code,
|
||||
'data': instance.data,
|
||||
};
|
||||
|
||||
ServiceListBase<T> _$ServiceListBaseFromJson<T>(Map<String, dynamic> json) =>
|
||||
ServiceListBase<T>(
|
||||
msg: json['msg'] as String?,
|
||||
code: (json['code'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceListBaseToJson<T>(ServiceListBase<T> instance) =>
|
||||
<String, dynamic>{
|
||||
'msg': instance.msg,
|
||||
'code': instance.code,
|
||||
};
|
||||
@@ -0,0 +1,203 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pj_supermarket_cloud/common/index.dart';
|
||||
|
||||
part 'hard_api_models.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceHardware extends ServiceBase {
|
||||
/// 编号
|
||||
final String? id;
|
||||
|
||||
/// 设备名
|
||||
final String? name;
|
||||
|
||||
/// 设备类型
|
||||
final String? type;
|
||||
|
||||
/// 设备类型enum
|
||||
final String? typeEnum;
|
||||
|
||||
/// 商户id
|
||||
final String? merchantId;
|
||||
|
||||
/// 商户部门id
|
||||
final String? merchantDeptId;
|
||||
|
||||
/// 硬件分组id
|
||||
final String? hardGroupId;
|
||||
|
||||
/// 商户名
|
||||
final String? merchantStr;
|
||||
|
||||
/// mq连接id
|
||||
final String? mqClientId;
|
||||
|
||||
/// android唯一id
|
||||
final String? uniqueCode;
|
||||
|
||||
/// 当前设备的topic
|
||||
final String? mainTopic;
|
||||
|
||||
/// mq地址
|
||||
final String? mqSocketAddress;
|
||||
|
||||
/// mq端口
|
||||
final String? mqSocketPort;
|
||||
|
||||
/// mq用户名
|
||||
final String? mqUsername;
|
||||
|
||||
/// mq密码
|
||||
final String? mqPassword;
|
||||
|
||||
/// 同步次数版本
|
||||
final int? mqSyncCount;
|
||||
|
||||
/// 人脸appId
|
||||
final String? faceAppId;
|
||||
|
||||
/// 人脸sdkKey
|
||||
final String? faceSdkKey;
|
||||
|
||||
/// 人脸activeKey
|
||||
final String? faceActiveKey;
|
||||
|
||||
ServiceHardware({
|
||||
this.id,
|
||||
this.name,
|
||||
this.type,
|
||||
this.typeEnum,
|
||||
this.merchantId,
|
||||
this.merchantDeptId,
|
||||
this.hardGroupId,
|
||||
this.merchantStr,
|
||||
this.mqClientId,
|
||||
this.uniqueCode,
|
||||
this.mainTopic,
|
||||
this.mqSocketAddress,
|
||||
this.mqSocketPort,
|
||||
this.mqUsername,
|
||||
this.mqPassword,
|
||||
this.mqSyncCount,
|
||||
this.faceAppId,
|
||||
this.faceSdkKey,
|
||||
this.faceActiveKey,
|
||||
});
|
||||
|
||||
factory ServiceHardware.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceHardwareFromJson(json);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() => _$ServiceHardwareToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceCar {
|
||||
/// 编号
|
||||
final String? id;
|
||||
|
||||
/// 父购物车id
|
||||
final String? parentCarId;
|
||||
|
||||
/// 商品名
|
||||
final String? productName;
|
||||
|
||||
/// 商品价格
|
||||
final int? productPrice;
|
||||
|
||||
/// 商品id
|
||||
final String? productId;
|
||||
|
||||
/// 数量
|
||||
final int? productCount;
|
||||
|
||||
/// 总价(分)
|
||||
@JsonKey(fromJson: JsonTool.stringToInt, toJson: JsonTool.intToString)
|
||||
final int? totalPrice;
|
||||
|
||||
/// 商品图片
|
||||
final String? productPic;
|
||||
|
||||
ServiceCar({
|
||||
this.id,
|
||||
this.parentCarId,
|
||||
this.productName,
|
||||
this.productPrice,
|
||||
this.productId,
|
||||
this.productCount,
|
||||
this.totalPrice,
|
||||
this.productPic,
|
||||
});
|
||||
|
||||
factory ServiceCar.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceCarFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceCarToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceGenerateInvoice {
|
||||
/// 图片
|
||||
final String? pic;
|
||||
|
||||
/// 记录id
|
||||
final String? historyId;
|
||||
|
||||
ServiceGenerateInvoice({
|
||||
this.pic,
|
||||
this.historyId,
|
||||
});
|
||||
|
||||
factory ServiceGenerateInvoice.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceGenerateInvoiceFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceGenerateInvoiceToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceQRCode {
|
||||
/// 总id
|
||||
@JsonKey(fromJson: JsonTool.intToString, toJson: JsonTool.stringToInt)
|
||||
final String? id;
|
||||
|
||||
/// 子id
|
||||
@JsonKey(fromJson: JsonTool.intToString, toJson: JsonTool.stringToInt)
|
||||
final String? itemId;
|
||||
|
||||
/// 类型id 比如钱包类型
|
||||
@JsonKey(fromJson: JsonTool.intToString, toJson: JsonTool.stringToInt)
|
||||
final String? typeId;
|
||||
|
||||
/// 用户id
|
||||
@JsonKey(fromJson: JsonTool.intToString, toJson: JsonTool.stringToInt)
|
||||
final String? userId;
|
||||
|
||||
/// 订单类型
|
||||
final String? orderType;
|
||||
|
||||
/// 支付类型
|
||||
final String? payType;
|
||||
|
||||
/// 过期时间 -1 代表没有限制
|
||||
final int? exceedTime;
|
||||
|
||||
/// 额外的用户信息
|
||||
final String? extra;
|
||||
|
||||
ServiceQRCode({
|
||||
this.id,
|
||||
this.itemId,
|
||||
this.typeId,
|
||||
this.userId,
|
||||
this.orderType,
|
||||
this.payType,
|
||||
this.exceedTime,
|
||||
this.extra,
|
||||
});
|
||||
|
||||
factory ServiceQRCode.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceQRCodeFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceQRCodeToJson(this);
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'hard_api_models.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ServiceHardware _$ServiceHardwareFromJson(Map<String, dynamic> json) =>
|
||||
ServiceHardware(
|
||||
id: json['id'] as String?,
|
||||
name: json['name'] as String?,
|
||||
type: json['type'] as String?,
|
||||
typeEnum: json['typeEnum'] as String?,
|
||||
merchantId: json['merchantId'] as String?,
|
||||
merchantDeptId: json['merchantDeptId'] as String?,
|
||||
hardGroupId: json['hardGroupId'] as String?,
|
||||
merchantStr: json['merchantStr'] as String?,
|
||||
mqClientId: json['mqClientId'] as String?,
|
||||
uniqueCode: json['uniqueCode'] as String?,
|
||||
mainTopic: json['mainTopic'] as String?,
|
||||
mqSocketAddress: json['mqSocketAddress'] as String?,
|
||||
mqSocketPort: json['mqSocketPort'] as String?,
|
||||
mqUsername: json['mqUsername'] as String?,
|
||||
mqPassword: json['mqPassword'] as String?,
|
||||
mqSyncCount: (json['mqSyncCount'] as num?)?.toInt(),
|
||||
faceAppId: json['faceAppId'] as String?,
|
||||
faceSdkKey: json['faceSdkKey'] as String?,
|
||||
faceActiveKey: json['faceActiveKey'] as String?,
|
||||
)
|
||||
..msg = json['msg'] as String?
|
||||
..code = (json['code'] as num?)?.toInt()
|
||||
..data = json['data'];
|
||||
|
||||
Map<String, dynamic> _$ServiceHardwareToJson(ServiceHardware instance) =>
|
||||
<String, dynamic>{
|
||||
'msg': instance.msg,
|
||||
'code': instance.code,
|
||||
'data': instance.data,
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'type': instance.type,
|
||||
'typeEnum': instance.typeEnum,
|
||||
'merchantId': instance.merchantId,
|
||||
'merchantDeptId': instance.merchantDeptId,
|
||||
'hardGroupId': instance.hardGroupId,
|
||||
'merchantStr': instance.merchantStr,
|
||||
'mqClientId': instance.mqClientId,
|
||||
'uniqueCode': instance.uniqueCode,
|
||||
'mainTopic': instance.mainTopic,
|
||||
'mqSocketAddress': instance.mqSocketAddress,
|
||||
'mqSocketPort': instance.mqSocketPort,
|
||||
'mqUsername': instance.mqUsername,
|
||||
'mqPassword': instance.mqPassword,
|
||||
'mqSyncCount': instance.mqSyncCount,
|
||||
'faceAppId': instance.faceAppId,
|
||||
'faceSdkKey': instance.faceSdkKey,
|
||||
'faceActiveKey': instance.faceActiveKey,
|
||||
};
|
||||
|
||||
ServiceCar _$ServiceCarFromJson(Map<String, dynamic> json) => ServiceCar(
|
||||
id: json['id'] as String?,
|
||||
parentCarId: json['parentCarId'] as String?,
|
||||
productName: json['productName'] as String?,
|
||||
productPrice: (json['productPrice'] as num?)?.toInt(),
|
||||
productId: json['productId'] as String?,
|
||||
productCount: (json['productCount'] as num?)?.toInt(),
|
||||
totalPrice: JsonTool.stringToInt(json['totalPrice'] as String?),
|
||||
productPic: json['productPic'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceCarToJson(ServiceCar instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'parentCarId': instance.parentCarId,
|
||||
'productName': instance.productName,
|
||||
'productPrice': instance.productPrice,
|
||||
'productId': instance.productId,
|
||||
'productCount': instance.productCount,
|
||||
'totalPrice': JsonTool.intToString(instance.totalPrice),
|
||||
'productPic': instance.productPic,
|
||||
};
|
||||
|
||||
ServiceGenerateInvoice _$ServiceGenerateInvoiceFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
ServiceGenerateInvoice(
|
||||
pic: json['pic'] as String?,
|
||||
historyId: json['historyId'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceGenerateInvoiceToJson(
|
||||
ServiceGenerateInvoice instance) =>
|
||||
<String, dynamic>{
|
||||
'pic': instance.pic,
|
||||
'historyId': instance.historyId,
|
||||
};
|
||||
|
||||
ServiceQRCode _$ServiceQRCodeFromJson(Map<String, dynamic> json) =>
|
||||
ServiceQRCode(
|
||||
id: JsonTool.intToString((json['id'] as num?)?.toInt()),
|
||||
itemId: JsonTool.intToString((json['itemId'] as num?)?.toInt()),
|
||||
typeId: JsonTool.intToString((json['typeId'] as num?)?.toInt()),
|
||||
userId: JsonTool.intToString((json['userId'] as num?)?.toInt()),
|
||||
orderType: json['orderType'] as String?,
|
||||
payType: json['payType'] as String?,
|
||||
exceedTime: (json['exceedTime'] as num?)?.toInt(),
|
||||
extra: json['extra'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceQRCodeToJson(ServiceQRCode instance) =>
|
||||
<String, dynamic>{
|
||||
'id': JsonTool.stringToInt(instance.id),
|
||||
'itemId': JsonTool.stringToInt(instance.itemId),
|
||||
'typeId': JsonTool.stringToInt(instance.typeId),
|
||||
'userId': JsonTool.stringToInt(instance.userId),
|
||||
'orderType': instance.orderType,
|
||||
'payType': instance.payType,
|
||||
'exceedTime': instance.exceedTime,
|
||||
'extra': instance.extra,
|
||||
};
|
||||
@@ -0,0 +1,90 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:pj_supermarket_cloud/common/index.dart';
|
||||
|
||||
part 'product_api_models.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceClassify {
|
||||
/// 分类编号
|
||||
String? id;
|
||||
|
||||
/// 分类名称
|
||||
String? name;
|
||||
|
||||
/// 移动端分类图
|
||||
String? picUrl;
|
||||
|
||||
/// 分类排序
|
||||
int? sort;
|
||||
|
||||
/// 开启状态
|
||||
int? status;
|
||||
|
||||
/// 系统类型
|
||||
int? systemType;
|
||||
|
||||
/// 用餐类型,早餐、中餐、晚餐
|
||||
String? categoryType;
|
||||
|
||||
ServiceClassify({
|
||||
this.id,
|
||||
this.name,
|
||||
this.picUrl,
|
||||
this.sort,
|
||||
this.status,
|
||||
this.systemType,
|
||||
this.categoryType,
|
||||
});
|
||||
|
||||
factory ServiceClassify.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceClassifyFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceClassifyToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceProduct {
|
||||
/// id
|
||||
String? id;
|
||||
|
||||
/// 菜品id
|
||||
String? spuId;
|
||||
|
||||
/// 时间类型 (食堂特有)
|
||||
@JsonKey(fromJson: JsonTool.anyToString)
|
||||
String? hourType;
|
||||
|
||||
/// 菜品分类编号
|
||||
String? categoryId;
|
||||
|
||||
/// 商品名
|
||||
String? name;
|
||||
|
||||
/// 商品图片
|
||||
String? picUrl;
|
||||
|
||||
/// 价格分
|
||||
int? price;
|
||||
|
||||
/// 排序
|
||||
int? sort;
|
||||
|
||||
/// 用餐类型,早餐、中餐、晚餐
|
||||
String? categoryType;
|
||||
|
||||
ServiceProduct({
|
||||
this.id,
|
||||
this.spuId,
|
||||
this.categoryId,
|
||||
this.name,
|
||||
this.picUrl,
|
||||
this.hourType,
|
||||
this.sort,
|
||||
this.categoryType,
|
||||
});
|
||||
|
||||
factory ServiceProduct.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceProductFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceProductToJson(this);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'product_api_models.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ServiceClassify _$ServiceClassifyFromJson(Map<String, dynamic> json) =>
|
||||
ServiceClassify(
|
||||
id: json['id'] as String?,
|
||||
name: json['name'] as String?,
|
||||
picUrl: json['picUrl'] as String?,
|
||||
sort: (json['sort'] as num?)?.toInt(),
|
||||
status: (json['status'] as num?)?.toInt(),
|
||||
systemType: (json['systemType'] as num?)?.toInt(),
|
||||
categoryType: json['categoryType'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceClassifyToJson(ServiceClassify instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'picUrl': instance.picUrl,
|
||||
'sort': instance.sort,
|
||||
'status': instance.status,
|
||||
'systemType': instance.systemType,
|
||||
'categoryType': instance.categoryType,
|
||||
};
|
||||
|
||||
ServiceProduct _$ServiceProductFromJson(Map<String, dynamic> json) =>
|
||||
ServiceProduct(
|
||||
id: json['id'] as String?,
|
||||
spuId: json['spuId'] as String?,
|
||||
categoryId: json['categoryId'] as String?,
|
||||
name: json['name'] as String?,
|
||||
picUrl: json['picUrl'] as String?,
|
||||
hourType: JsonTool.anyToString(json['hourType']),
|
||||
sort: (json['sort'] as num?)?.toInt(),
|
||||
categoryType: json['categoryType'] as String?,
|
||||
)..price = (json['price'] as num?)?.toInt();
|
||||
|
||||
Map<String, dynamic> _$ServiceProductToJson(ServiceProduct instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'spuId': instance.spuId,
|
||||
'hourType': instance.hourType,
|
||||
'categoryId': instance.categoryId,
|
||||
'name': instance.name,
|
||||
'picUrl': instance.picUrl,
|
||||
'price': instance.price,
|
||||
'sort': instance.sort,
|
||||
'categoryType': instance.categoryType,
|
||||
};
|
||||
@@ -0,0 +1,128 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:pj_supermarket_cloud/common/index.dart';
|
||||
|
||||
part 'user_api_models.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceUser {
|
||||
/// 用户ID
|
||||
String? userId;
|
||||
|
||||
/// 用户昵称
|
||||
String? username;
|
||||
|
||||
/// 部门ID
|
||||
String? deptId;
|
||||
|
||||
/// 手机号码
|
||||
String? userMobile;
|
||||
|
||||
/// 用户头像
|
||||
String? userAvatar;
|
||||
|
||||
/// 钱包id
|
||||
String? walletId;
|
||||
|
||||
/// 钱包类型id
|
||||
String? walletTypeId;
|
||||
|
||||
/// 钱包余额
|
||||
int? walletBalance;
|
||||
|
||||
/// 是否冻结饭卡
|
||||
@JsonKey(fromJson: JsonTool.stringToBoolean, toJson: JsonTool.booleanToString)
|
||||
bool? walletIsFreeze;
|
||||
|
||||
/// 卡号
|
||||
String? walletCardNumber;
|
||||
|
||||
/// 构造函数
|
||||
ServiceUser({
|
||||
this.userId,
|
||||
this.username,
|
||||
this.deptId,
|
||||
this.userMobile,
|
||||
this.userAvatar,
|
||||
this.walletId,
|
||||
this.walletTypeId,
|
||||
this.walletBalance,
|
||||
this.walletIsFreeze,
|
||||
this.walletCardNumber,
|
||||
});
|
||||
|
||||
factory ServiceUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceUserFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceUserToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceAuth {
|
||||
/// 用户编号
|
||||
final int? userId;
|
||||
|
||||
/// 访问令牌
|
||||
final String? accessToken;
|
||||
|
||||
/// 刷新令牌
|
||||
final String? refreshToken;
|
||||
|
||||
/// 过期时间
|
||||
final int? expiresTime;
|
||||
|
||||
ServiceAuth({
|
||||
required this.userId,
|
||||
required this.accessToken,
|
||||
required this.refreshToken,
|
||||
required this.expiresTime,
|
||||
});
|
||||
|
||||
factory ServiceAuth.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceAuthFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceAuthToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceAsyncFace {
|
||||
/// 编号
|
||||
final String? id;
|
||||
|
||||
/// 人脸编号
|
||||
final String? autoCode;
|
||||
|
||||
/// 人脸图片
|
||||
final String? faceImg;
|
||||
|
||||
/// 用户id
|
||||
final String? userId;
|
||||
|
||||
/// 用户名
|
||||
final String? username;
|
||||
|
||||
/// 用户头像
|
||||
final String? avatar;
|
||||
|
||||
/// 部门id
|
||||
final String? deptId;
|
||||
|
||||
/// 部门名
|
||||
final String? deptName;
|
||||
|
||||
ServiceAsyncFace({
|
||||
this.id,
|
||||
this.autoCode,
|
||||
this.faceImg,
|
||||
this.userId,
|
||||
this.username,
|
||||
this.avatar,
|
||||
this.deptId,
|
||||
this.deptName,
|
||||
});
|
||||
|
||||
factory ServiceAsyncFace.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceAsyncFaceFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServiceAsyncFaceToJson(this);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'user_api_models.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ServiceUser _$ServiceUserFromJson(Map<String, dynamic> json) => ServiceUser(
|
||||
userId: json['userId'] as String?,
|
||||
username: json['username'] as String?,
|
||||
deptId: json['deptId'] as String?,
|
||||
userMobile: json['userMobile'] as String?,
|
||||
userAvatar: json['userAvatar'] as String?,
|
||||
walletId: json['walletId'] as String?,
|
||||
walletTypeId: json['walletTypeId'] as String?,
|
||||
walletBalance: (json['walletBalance'] as num?)?.toInt(),
|
||||
walletIsFreeze:
|
||||
JsonTool.stringToBoolean(json['walletIsFreeze'] as String),
|
||||
walletCardNumber: json['walletCardNumber'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceUserToJson(ServiceUser instance) =>
|
||||
<String, dynamic>{
|
||||
'userId': instance.userId,
|
||||
'username': instance.username,
|
||||
'deptId': instance.deptId,
|
||||
'userMobile': instance.userMobile,
|
||||
'userAvatar': instance.userAvatar,
|
||||
'walletId': instance.walletId,
|
||||
'walletTypeId': instance.walletTypeId,
|
||||
'walletBalance': instance.walletBalance,
|
||||
'walletIsFreeze': JsonTool.booleanToString(instance.walletIsFreeze),
|
||||
'walletCardNumber': instance.walletCardNumber,
|
||||
};
|
||||
|
||||
ServiceAuth _$ServiceAuthFromJson(Map<String, dynamic> json) => ServiceAuth(
|
||||
userId: (json['userId'] as num?)?.toInt(),
|
||||
accessToken: json['accessToken'] as String?,
|
||||
refreshToken: json['refreshToken'] as String?,
|
||||
expiresTime: (json['expiresTime'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceAuthToJson(ServiceAuth instance) =>
|
||||
<String, dynamic>{
|
||||
'userId': instance.userId,
|
||||
'accessToken': instance.accessToken,
|
||||
'refreshToken': instance.refreshToken,
|
||||
'expiresTime': instance.expiresTime,
|
||||
};
|
||||
|
||||
ServiceAsyncFace _$ServiceAsyncFaceFromJson(Map<String, dynamic> json) =>
|
||||
ServiceAsyncFace(
|
||||
id: json['id'] as String?,
|
||||
autoCode: json['autoCode'] as String?,
|
||||
faceImg: json['faceImg'] as String?,
|
||||
userId: json['userId'] as String?,
|
||||
username: json['username'] as String?,
|
||||
avatar: json['avatar'] as String?,
|
||||
deptId: json['deptId'] as String?,
|
||||
deptName: json['deptName'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServiceAsyncFaceToJson(ServiceAsyncFace instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'autoCode': instance.autoCode,
|
||||
'faceImg': instance.faceImg,
|
||||
'userId': instance.userId,
|
||||
'username': instance.username,
|
||||
'avatar': instance.avatar,
|
||||
'deptId': instance.deptId,
|
||||
'deptName': instance.deptName,
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:pj_supermarket_cloud/common/index.dart';
|
||||
|
||||
part 'wallet_api_models.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ServicePaySetting {
|
||||
/// 唯一标识符
|
||||
final String? id;
|
||||
|
||||
/// 是否开启每一餐的额外缴费
|
||||
@JsonKey(fromJson: JsonTool.stringToBoolean, toJson: JsonTool.booleanToString)
|
||||
final bool? payAmountEnable;
|
||||
|
||||
/// 每一餐的上限(分)
|
||||
final int? payAmountMealLimit;
|
||||
|
||||
/// 每一餐的倍数
|
||||
final double? payAmountMealTimes;
|
||||
|
||||
/// 售后的退款理由
|
||||
final String? afterSaleRefundReasons;
|
||||
|
||||
/// 售后的退货理由
|
||||
final String? afterSaleReturnReasons;
|
||||
|
||||
/// 是否开启钱包二维码刷新
|
||||
@JsonKey(fromJson: JsonTool.stringToBoolean, toJson: JsonTool.booleanToString)
|
||||
final bool? refreshQrCodeEnable;
|
||||
|
||||
/// 二维码刷新频率
|
||||
final int? refreshQrCodeFre;
|
||||
|
||||
/// 是否开启离线订单审批
|
||||
@JsonKey(fromJson: JsonTool.stringToBoolean, toJson: JsonTool.booleanToString)
|
||||
final bool? offLineOrderApplyEnable;
|
||||
|
||||
ServicePaySetting({
|
||||
this.id,
|
||||
this.payAmountEnable,
|
||||
this.payAmountMealLimit,
|
||||
this.payAmountMealTimes,
|
||||
this.afterSaleRefundReasons,
|
||||
this.afterSaleReturnReasons,
|
||||
this.refreshQrCodeEnable,
|
||||
this.refreshQrCodeFre,
|
||||
this.offLineOrderApplyEnable,
|
||||
});
|
||||
|
||||
factory ServicePaySetting.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServicePaySettingFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ServicePaySettingToJson(this);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'wallet_api_models.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ServicePaySetting _$ServicePaySettingFromJson(Map<String, dynamic> json) =>
|
||||
ServicePaySetting(
|
||||
id: json['id'] as String?,
|
||||
payAmountEnable:
|
||||
JsonTool.stringToBoolean(json['payAmountEnable'] as String),
|
||||
payAmountMealLimit: (json['payAmountMealLimit'] as num?)?.toInt(),
|
||||
payAmountMealTimes: (json['payAmountMealTimes'] as num?)?.toDouble(),
|
||||
afterSaleRefundReasons: json['afterSaleRefundReasons'] as String?,
|
||||
afterSaleReturnReasons: json['afterSaleReturnReasons'] as String?,
|
||||
refreshQrCodeEnable:
|
||||
JsonTool.stringToBoolean(json['refreshQrCodeEnable'] as String),
|
||||
refreshQrCodeFre: (json['refreshQrCodeFre'] as num?)?.toInt(),
|
||||
offLineOrderApplyEnable:
|
||||
JsonTool.stringToBoolean(json['offLineOrderApplyEnable'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ServicePaySettingToJson(ServicePaySetting instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'payAmountEnable': JsonTool.booleanToString(instance.payAmountEnable),
|
||||
'payAmountMealLimit': instance.payAmountMealLimit,
|
||||
'payAmountMealTimes': instance.payAmountMealTimes,
|
||||
'afterSaleRefundReasons': instance.afterSaleRefundReasons,
|
||||
'afterSaleReturnReasons': instance.afterSaleReturnReasons,
|
||||
'refreshQrCodeEnable':
|
||||
JsonTool.booleanToString(instance.refreshQrCodeEnable),
|
||||
'refreshQrCodeFre': instance.refreshQrCodeFre,
|
||||
'offLineOrderApplyEnable':
|
||||
JsonTool.booleanToString(instance.offLineOrderApplyEnable),
|
||||
};
|
||||
Reference in new issue
Block a user