Initial commit

This commit is contained in:
jahongireshonqulov
2025-10-18 09:40:06 +05:00
commit 1bf3e41abe
352 changed files with 16315 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
class BannerResponse {
BannerResponse({this.id, this.image, this.createdAt, this.updatedAt, this.v});
BannerResponse.fromJson(dynamic json) {
id = json['_id'];
image = json['image'];
createdAt = json['createdAt'];
updatedAt = json['updatedAt'];
v = json['__v'];
}
String? id;
String? image;
String? createdAt;
String? updatedAt;
int? v;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['_id'] = id;
map['image'] = image;
map['createdAt'] = createdAt;
map['updatedAt'] = updatedAt;
map['__v'] = v;
return map;
}
}

View File

@@ -0,0 +1,24 @@
class CommentRequest {
CommentRequest({
this.message,
this.rate,
this.orderNumber,});
CommentRequest.fromJson(dynamic json) {
message = json['message'];
rate = json['rate'];
orderNumber = json['order_number'];
}
String? message;
int? rate;
String? orderNumber;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['message'] = message;
map['rate'] = rate;
map['order_number'] = orderNumber;
return map;
}
}

View File

@@ -0,0 +1,44 @@
class CommentResponse {
CommentResponse({
this.message,
this.rate,
this.userUcode,
this.orderNumber,
this.id,
this.createdAt,
this.updatedAt,
this.v,});
CommentResponse.fromJson(dynamic json) {
message = json['message'];
rate = json['rate'];
userUcode = json['user_ucode'];
orderNumber = json['order_number'];
id = json['_id'];
createdAt = json['createdAt'];
updatedAt = json['updatedAt'];
v = json['__v'];
}
String? message;
int? rate;
String? userUcode;
String? orderNumber;
String? id;
String? createdAt;
String? updatedAt;
int? v;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['message'] = message;
map['rate'] = rate;
map['user_ucode'] = userUcode;
map['order_number'] = orderNumber;
map['_id'] = id;
map['createdAt'] = createdAt;
map['updatedAt'] = updatedAt;
map['__v'] = v;
return map;
}
}

View File

@@ -0,0 +1,79 @@
import 'package:cargocalculaterapp/core/models/name.dart';
class NotificationResponse {
NotificationResponse({this.notifications, this.totalCount});
NotificationResponse.fromJson(dynamic json) {
if (json['notifications'] != null) {
notifications = [];
json['notifications'].forEach((v) {
notifications?.add(Notifications.fromJson(v));
});
}
totalCount = json['totalCount'];
}
List<Notifications>? notifications;
int? totalCount;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (notifications != null) {
map['notifications'] = notifications?.map((v) => v.toJson()).toList();
}
map['totalCount'] = totalCount;
return map;
}
}
class Notifications {
Notifications({
this.id,
this.userUcode,
this.orderNumber,
this.text,
this.status,
this.isRead,
this.createdAt,
this.updatedAt,
this.v,
});
Notifications.fromJson(dynamic json) {
id = json['_id'];
userUcode = json['user_ucode'];
orderNumber = json['order_number'];
text = json['text'] != null ? Name.fromJson(json['text']) : null;
status = json['status'];
isRead = json['is_read'];
createdAt = json['createdAt'];
updatedAt = json['updatedAt'];
v = json['__v'];
}
String? id;
String? userUcode;
String? orderNumber;
Name? text;
String? status;
bool? isRead;
String? createdAt;
String? updatedAt;
int? v;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['_id'] = id;
map['user_ucode'] = userUcode;
map['order_number'] = orderNumber;
if (text != null) {
map['text'] = text?.toJson();
}
map['status'] = status;
map['is_read'] = isRead;
map['createdAt'] = createdAt;
map['updatedAt'] = updatedAt;
map['__v'] = v;
return map;
}
}

View File

@@ -0,0 +1,145 @@
import 'package:cargocalculaterapp/core/models/name.dart';
class OrderSingleResponse {
OrderSingleResponse({
this.id,
this.userUcode,
this.phoneNumber,
this.gmail,
this.quantity,
this.nameUz,
this.nameRu,
this.nameZh,
this.weight,
this.m3,
this.averageWeightKg,
this.wharehouseUz,
this.wharehouseRu,
this.wharehouseZh,
this.deliveryPrice,
this.shipmentId,
this.leadId,
this.status,
this.partiallyArrived,
this.fullArrived,
this.orderNumber,
this.createdAt,
this.updatedAt,
this.v,
this.arrivalDate,
this.images,
});
OrderSingleResponse.fromJson(dynamic json) {
userUcode = json['user_ucode'];
phoneNumber = json['phone_number'];
gmail = json['gmail'];
quantity = json['quantity'];
nameUz = json['nameUz'];
nameRu = json['nameRu'];
nameZh = json['nameZh'];
weight = json['weight'];
m3 = json['m3'];
averageWeightKg = json['average_weight_kg'];
wharehouseUz = json['wharehouseUz'];
wharehouseRu = json['wharehouseRu'];
wharehouseZh = json['wharehouseZh'];
deliveryPrice = json['delivery_price'];
shipmentId = json['shipment_id'];
leadId = json['lead_id'];
status = json['status'] != null ? Status.fromJson(json['status']) : null;
partiallyArrived = json['partially_arrived'];
fullArrived = json['full_arrived'];
orderNumber = json['order_number'];
createdAt = json['createdAt'];
updatedAt = json['updatedAt'];
v = json['__v'];
id = json['id'];
arrivalDate = json['arrival_date'];
images = json['images'] != null ? json['images'].cast<String>() : [];
}
String? userUcode;
String? phoneNumber;
String? gmail;
int? quantity;
String? nameUz;
String? nameRu;
String? nameZh;
String? weight;
String? m3;
String? averageWeightKg;
String? wharehouseUz;
String? wharehouseRu;
String? wharehouseZh;
String? deliveryPrice;
String? shipmentId;
String? leadId;
Status? status;
bool? partiallyArrived;
bool? fullArrived;
String? orderNumber;
String? createdAt;
String? updatedAt;
int? v;
String? id;
String? arrivalDate;
List<String>? images;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['user_ucode'] = userUcode;
map['phone_number'] = phoneNumber;
map['gmail'] = gmail;
map['quantity'] = quantity;
map['nameUz'] = nameUz;
map['nameRu'] = nameRu;
map['nameZh'] = nameZh;
map['weight'] = weight;
map['m3'] = m3;
map['average_weight_kg'] = averageWeightKg;
map['wharehouseUz'] = wharehouseUz;
map['wharehouseRu'] = wharehouseRu;
map['wharehouseZh'] = wharehouseZh;
map['delivery_price'] = deliveryPrice;
map['shipment_id'] = shipmentId;
map['lead_id'] = leadId;
if (status != null) {
map['status'] = status?.toJson();
}
map['partially_arrived'] = partiallyArrived;
map['full_arrived'] = fullArrived;
map['order_number'] = orderNumber;
map['createdAt'] = createdAt;
map['updatedAt'] = updatedAt;
map['__v'] = v;
map['id'] = id;
map['arrival_date'] = arrivalDate;
map['images'] = images;
return map;
}
}
class Status {
Status({this.code, this.translations});
Status.fromJson(dynamic json) {
code = json['code'];
translations =
json['translations'] != null
? Name.fromJson(json['translations'])
: null;
}
String? code;
Name? translations;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['code'] = code;
if (translations != null) {
map['translations'] = translations?.toJson();
}
return map;
}
}

View File

@@ -0,0 +1,160 @@
import '../../../../core/models/name.dart';
class OrdersListResponse {
OrdersListResponse({this.totalCount, this.data});
OrdersListResponse.fromJson(dynamic json) {
totalCount = json['totalCount'];
if (json['data'] != null) {
data = [];
json['data'].forEach((v) {
data?.add(Data.fromJson(v));
});
}
}
int? totalCount;
List<Data>? data;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['totalCount'] = totalCount;
if (data != null) {
map['data'] = data?.map((v) => v.toJson()).toList();
}
return map;
}
}
class Data {
Data({
this.id,
this.userUcode,
this.phoneNumber,
this.gmail,
this.quantity,
this.nameUz,
this.nameRu,
this.nameZh,
this.size,
this.wharehouseUz,
this.wharehouseRu,
this.wharehouseZh,
this.deliveryPrice,
this.shipmentId,
this.leadId,
this.status,
this.partiallyArrived,
this.fullArrived,
this.orderNumber,
this.createdAt,
this.updatedAt,
this.v,
this.arrivalDate,
});
Data.fromJson(dynamic json) {
userUcode = json['user_ucode'];
phoneNumber = json['phone_number'];
gmail = json['gmail'];
quantity = json['quantity'];
nameUz = json['nameUz'];
nameRu = json['nameRu'];
nameZh = json['nameZh'];
size = json['size'];
wharehouseUz = json['wharehouseUz'];
wharehouseRu = json['wharehouseRu'];
wharehouseZh = json['wharehouseZh'];
deliveryPrice = json['delivery_price'];
shipmentId = json['shipment_id'];
leadId = json['lead_id'];
status = json['status'] != null ? Status.fromJson(json['status']) : null;
partiallyArrived = json['partially_arrived'];
fullArrived = json['full_arrived'];
orderNumber = json['order_number'];
createdAt = json['createdAt'];
updatedAt = json['updatedAt'];
v = json['__v'];
id = json['id'];
arrivalDate = json['arrival_date'];
}
String? userUcode;
String? phoneNumber;
String? gmail;
int? quantity;
String? nameUz;
String? nameRu;
String? nameZh;
String? size;
String? wharehouseUz;
String? wharehouseRu;
String? wharehouseZh;
String? deliveryPrice;
String? shipmentId;
String? leadId;
Status? status;
bool? partiallyArrived;
bool? fullArrived;
String? orderNumber;
String? createdAt;
String? updatedAt;
int? v;
String? id;
String? arrivalDate;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['_id'] = id;
map['user_ucode'] = userUcode;
map['phone_number'] = phoneNumber;
map['gmail'] = gmail;
map['quantity'] = quantity;
map['nameUz'] = nameUz;
map['nameRu'] = nameRu;
map['nameZh'] = nameZh;
map['size'] = size;
map['wharehouseUz'] = wharehouseUz;
map['wharehouseRu'] = wharehouseRu;
map['wharehouseZh'] = wharehouseZh;
map['delivery_price'] = deliveryPrice;
map['shipment_id'] = shipmentId;
map['lead_id'] = leadId;
if (status != null) {
map['status'] = status?.toJson();
}
map['partially_arrived'] = partiallyArrived;
map['full_arrived'] = fullArrived;
map['order_number'] = orderNumber;
map['createdAt'] = createdAt;
map['updatedAt'] = updatedAt;
map['__v'] = v;
map['id'] = id;
map['arrival_date'] = arrivalDate;
return map;
}
}
class Status {
Status({this.code, this.translations});
Status.fromJson(dynamic json) {
code = json['code'];
translations =
json['translations'] != null
? Name.fromJson(json['translations'])
: null;
}
String? code;
Name? translations;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['code'] = code;
if (translations != null) {
map['translations'] = translations?.toJson();
}
return map;
}
}

View File

@@ -0,0 +1,16 @@
class ReadNotificationRequest {
ReadNotificationRequest({
this.notificationIds,});
ReadNotificationRequest.fromJson(dynamic json) {
notificationIds = json['notification_ids'] != null ? json['notification_ids'].cast<String>() : [];
}
List<String>? notificationIds;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['notification_ids'] = notificationIds;
return map;
}
}

View File

@@ -0,0 +1,16 @@
class ReadNotificationResponse {
ReadNotificationResponse({
this.message,});
ReadNotificationResponse.fromJson(dynamic json) {
message = json['message'];
}
String? message;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['message'] = message;
return map;
}
}