UCommentReadParams.fromMap constructor
UCommentReadParams.fromMap(
- Map<String, dynamic> json
)
Implementation
factory UCommentReadParams.fromMap(Map<String, dynamic> json) => UCommentReadParams(
userId: json["userId"],
productId: json["productId"],
targetUserId: json["targetUserId"],
showMedia: json["showMedia"] ?? false,
pageSize: json["pageSize"] ?? 0,
pageNumber: json["pageNumber"] ?? 0,
fromCreatedAt: json["fromCreatedAt"] == null ? null : DateTime.parse(json["fromCreatedAt"]),
toCreatedAt: json["toCreatedAt"] == null ? null : DateTime.parse(json["toCreatedAt"]),
orderByCreatedAt: json["orderByCreatedAt"] ?? false,
orderByCreatedAtDesc: json["orderByCreatedAtDesc"] ?? false,
orderByUpdatedAt: json["orderByUpdatedAt"] ?? false,
orderByUpdatedAtDesc: json["orderByUpdatedAtDesc"] ?? false,
tags: json["tags"] == null ? null : List<int>.from(json["tags"].map((dynamic x) => x)),
);