parent
450b0a2e86
commit
2266db00cf
@ -0,0 +1,33 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
part 'integral_goods_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class IntegralGoodsListModel extends Equatable {
|
||||
final int id;
|
||||
final String skuName;
|
||||
final String mainPhoto;
|
||||
final int points;
|
||||
final int? saleNum;
|
||||
|
||||
factory IntegralGoodsListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$IntegralGoodsListModelFromJson(json);
|
||||
|
||||
const IntegralGoodsListModel({
|
||||
required this.id,
|
||||
required this.skuName,
|
||||
required this.mainPhoto,
|
||||
required this.points,
|
||||
this.saleNum,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
skuName,
|
||||
mainPhoto,
|
||||
points,
|
||||
saleNum,
|
||||
];
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'integral_goods_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
IntegralGoodsListModel _$IntegralGoodsListModelFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
IntegralGoodsListModel(
|
||||
id: json['id'] as int,
|
||||
skuName: json['skuName'] as String,
|
||||
mainPhoto: json['mainPhoto'] as String,
|
||||
points: json['points'] as int,
|
||||
saleNum: json['saleNum'] as int?,
|
||||
);
|
Loading…
Reference in new issue