updated body for update space model

This commit is contained in:
hannathkadher
2025-03-06 11:41:36 +04:00
parent d2ff909bf2
commit fecab17cbe
7 changed files with 26 additions and 31 deletions

View File

@ -26,9 +26,7 @@ class Tag extends BaseTag {
uuid: json['uuid'] ?? '',
internalId: internalId,
tag: json['name'] ?? '',
product: json['product'] != null
? ProductModel.fromMap(json['product'])
: null,
product: json['product'] != null ? ProductModel.fromMap(json['product']) : null,
);
}
@ -41,7 +39,7 @@ class Tag extends BaseTag {
String? internalId,
}) {
return Tag(
uuid: uuid,
uuid: uuid ?? this.uuid,
tag: tag ?? this.tag,
product: product ?? this.product,
location: location ?? this.location,
@ -61,7 +59,7 @@ class Tag extends BaseTag {
extension TagModelExtensions on Tag {
TagBodyModel toTagBodyModel() {
return TagBodyModel()
..uuid = uuid
..uuid = uuid
..tag = tag ?? ''
..productUuid = product?.uuid;
}