diff --git a/docs/model.ndm2 b/docs/model.ndm2 index 9d7be97..1022b3d 100644 --- a/docs/model.ndm2 +++ b/docs/model.ndm2 @@ -15150,144 +15150,6 @@ "dataCompressions": [] } }, - { - "objectType": "Table_MSSQL", - "name": "GetAllProductsByFilterResponse", - "comment": "خروجی واکشی توکن Otp بر مبنای فیلتر", - "owner": "", - "isChangeTracking": false, - "isTrackColumnsUpdated": false, - "oldName": "", - "isSystemTable": false, - "createTime": "", - "modifyTime": "", - "objectID": 9936, - "numberOfRows": 0, - "identityCurrent": 0, - "dataLength": 0, - "indexLength": 0, - "fields": [ - { - "objectType": "TableField_MSSQL", - "name": "MetaData", - "type": "MetaData", - "size": 0, - "isNullable": "Yes", - "scale": 0, - "comment": "متادیتا", - "computedExpression": "", - "defaultValue": "", - "defaultValueType": "Others", - "schema": "", - "userDefinedType": "", - "collate": "", - "isWithValues": false, - "isFilestream": false, - "isColumnSet": false, - "isPersisted": false, - "isSparse": false, - "isRowGUIDColumn": false, - "oldName": "MetaData", - "computedBaseType": "", - "isDefaultConstraint": false, - "defaultConstraint": "", - "isIdentity": false, - "isExistingField": false, - "identitySeed": 0, - "identityIncrement": 0, - "identityIsNotForReplication": false - }, - { - "objectType": "TableField_MSSQL", - "name": "Model", - "type": "Collection", - "size": 0, - "isNullable": "Yes", - "scale": 0, - "comment": "مدل خروجی", - "computedExpression": "", - "defaultValue": "", - "defaultValueType": "Others", - "schema": "", - "userDefinedType": "", - "collate": "", - "isWithValues": false, - "isFilestream": false, - "isColumnSet": false, - "isPersisted": false, - "isSparse": false, - "isRowGUIDColumn": false, - "oldName": "Model", - "computedBaseType": "", - "isDefaultConstraint": false, - "defaultConstraint": "", - "isIdentity": false, - "isExistingField": false, - "identitySeed": 0, - "identityIncrement": 0, - "identityIsNotForReplication": false - } - ], - "indexes": [], - "foreignKeys": [ - { - "objectType": "ForeignKey_MSSQL", - "name": "fk_GetAllProductsByFilterResponse_GetAllProductsByFilterResponseModel", - "fields": [ - "Model" - ], - "referencedSchema": "CMS", - "referencedTable": "GetAllProductsByFilterResponseModel", - "referencedFields": [ - "Id" - ], - "onDelete": "", - "onUpdate": "", - "isNotForReplication": false, - "isEnabled": false, - "comment": "", - "sourceCardinality": "NoneRelationship", - "targetCardinality": "NoneRelationship", - "oldName": "" - }, - { - "objectType": "ForeignKey_MSSQL", - "name": "fk_GetAllProductsByFilterResponse_GetAllProductsByFilterResponseModel_1", - "fields": [ - "Model" - ], - "referencedSchema": "FrontOffice", - "referencedTable": "GetAllProductsByFilterResponseModel", - "referencedFields": [ - "Id" - ], - "onDelete": "", - "onUpdate": "", - "isNotForReplication": false, - "isEnabled": true, - "comment": "", - "sourceCardinality": "NoneRelationship", - "targetCardinality": "NoneRelationship", - "oldName": "" - } - ], - "uniques": [], - "checks": [], - "triggers": [], - "storage": { - "objectType": "Storage_MSSQL", - "name": "", - "oldName": "", - "storageType": "Default", - "filegroup": "", - "textImageFilegroup": "", - "filestreamFilegroup": "", - "partitionScheme": "", - "partitionColumn": "", - "filestreamPartitionScheme": "", - "dataCompressions": [] - } - }, { "objectType": "Table_MSSQL", "name": "GetAllProductsByFilterRequest", @@ -16429,6 +16291,150 @@ "dataCompressions": [] } }, + { + "objectType": "Table_MSSQL", + "name": "GetAllProductsByFilterResponse", + "comment": "خروجی واکشی توکن Otp بر مبنای فیلتر", + "owner": "", + "isChangeTracking": false, + "isTrackColumnsUpdated": false, + "oldName": "", + "isSystemTable": false, + "createTime": "", + "modifyTime": "", + "objectID": 9936, + "numberOfRows": 0, + "identityCurrent": 0, + "dataLength": 0, + "indexLength": 0, + "fields": [ + { + "objectType": "TableField_MSSQL", + "name": "MetaData", + "type": "MetaData", + "size": 0, + "isNullable": "Yes", + "scale": 0, + "comment": "متادیتا", + "computedExpression": "", + "defaultValue": "", + "defaultValueType": "None", + "schema": "", + "userDefinedType": "", + "collate": "", + "isWithValues": false, + "isFilestream": false, + "isColumnSet": false, + "isPersisted": false, + "isSparse": false, + "isRowGUIDColumn": false, + "oldName": "MetaData", + "computedBaseType": "", + "isDefaultConstraint": false, + "defaultConstraint": "", + "isIdentity": false, + "isExistingField": false, + "identitySeed": 0, + "identityIncrement": 0, + "identityIsNotForReplication": false + }, + { + "objectType": "TableField_MSSQL", + "name": "Model", + "type": "Collection", + "size": 0, + "isNullable": "Yes", + "scale": 0, + "comment": "مدل خروجی", + "computedExpression": "", + "defaultValue": "", + "defaultValueType": "Others", + "schema": "", + "userDefinedType": "", + "collate": "", + "isWithValues": false, + "isFilestream": false, + "isColumnSet": false, + "isPersisted": false, + "isSparse": false, + "isRowGUIDColumn": false, + "oldName": "Model", + "computedBaseType": "", + "isDefaultConstraint": false, + "defaultConstraint": "", + "isIdentity": false, + "isExistingField": false, + "identitySeed": 0, + "identityIncrement": 0, + "identityIsNotForReplication": false + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MSSQL", + "name": "", + "fields": [], + "fillFactor": 0, + "oldName": "", + "isClustered": true, + "isPadded": false, + "noRecomputeStatistics": false, + "ignoreDuplicatedKeyValues": false, + "allowRowLocks": true, + "allowPageLocks": true, + "storage": { + "objectType": "Storage_MSSQL", + "name": "", + "oldName": "", + "storageType": "Default", + "filegroup": "", + "textImageFilegroup": "", + "filestreamFilegroup": "", + "partitionScheme": "", + "partitionColumn": "", + "filestreamPartitionScheme": "", + "dataCompressions": [] + } + }, + "foreignKeys": [ + { + "objectType": "ForeignKey_MSSQL", + "name": "fk_GetAllProductsByFilterResponse_GetAllProductsByFilterResponseModel_1", + "fields": [ + "Model" + ], + "referencedSchema": "FrontOffice", + "referencedTable": "GetAllProductsByFilterResponseModel", + "referencedFields": [ + "Id" + ], + "onDelete": "", + "onUpdate": "", + "isNotForReplication": false, + "isEnabled": true, + "comment": "", + "sourceCardinality": "NoneRelationship", + "targetCardinality": "NoneRelationship", + "oldName": "" + } + ], + "uniques": [], + "checks": [], + "triggers": [], + "storage": { + "objectType": "Storage_MSSQL", + "name": "", + "oldName": "", + "storageType": "Default", + "filegroup": "", + "textImageFilegroup": "", + "filestreamFilegroup": "", + "partitionScheme": "", + "partitionColumn": "", + "filestreamPartitionScheme": "", + "dataCompressions": [] + } + }, { "objectType": "Table_MSSQL", "name": "GetAllUserCartResponse", @@ -20151,40 +20157,6 @@ "isVisible": false } }, - { - "name": "fk_GetAllProductsByFilterResponse_GetAllProductsByFilterResponseModel_1", - "sourceTableName": "GetAllProductsByFilterResponse", - "sourceSchemaName": "FrontOffice", - "lineWidth": 1, - "visible": true, - "vertices": [ - { - "x": 3215, - "y": 2600 - }, - { - "x": 3195, - "y": 2600 - } - ], - "label": { - "x": 3225, - "y": 2560, - "width": 516, - "height": 32, - "fontName": "Sans", - "fontSize": 14, - "fontColor": { - "r": 51, - "g": 51, - "b": 51, - "a": 1 - }, - "isFontBold": false, - "isFontItalic": false, - "isVisible": false - } - }, { "name": "fk_ProductsService_GetAllProductsByFilterRequest_1", "sourceTableName": "ProductsService", @@ -20364,24 +20336,16 @@ "vertices": [ { "x": 3445, - "y": 3569 - }, - { - "x": 3430, - "y": 3569 - }, - { - "x": 3430, - "y": 3572 + "y": 3570 }, { "x": 3415, - "y": 3572 + "y": 3570 } ], "label": { - "x": 3039, - "y": 3529, + "x": 3461, + "y": 3572, "width": 416, "height": 32, "fontName": "Sans", @@ -20396,6 +20360,48 @@ "isFontItalic": false, "isVisible": false } + }, + { + "name": "fk_GetAllProductsByFilterResponse_GetAllProductsByFilterResponseModel_1", + "sourceTableName": "GetAllProductsByFilterResponse", + "sourceSchemaName": "FrontOffice", + "lineWidth": 1, + "visible": true, + "vertices": [ + { + "x": 3215, + "y": 2609 + }, + { + "x": 3205, + "y": 2609 + }, + { + "x": 3205, + "y": 2614 + }, + { + "x": 3195, + "y": 2614 + } + ], + "label": { + "x": 2709, + "y": 2569, + "width": 516, + "height": 32, + "fontName": "Sans", + "fontSize": 14, + "fontColor": { + "r": 51, + "g": 51, + "b": 51, + "a": 1 + }, + "isFontBold": false, + "isFontItalic": false, + "isVisible": false + } } ], "viewRelations": [] diff --git a/src/FrontOffice.BFF.Application/ShopingCartCQ/Queries/GetAllUserCart/GetAllUserCartResponseDto.cs b/src/FrontOffice.BFF.Application/ShopingCartCQ/Queries/GetAllUserCart/GetAllUserCartResponseDto.cs index 44c4300..f24107f 100644 --- a/src/FrontOffice.BFF.Application/ShopingCartCQ/Queries/GetAllUserCart/GetAllUserCartResponseDto.cs +++ b/src/FrontOffice.BFF.Application/ShopingCartCQ/Queries/GetAllUserCart/GetAllUserCartResponseDto.cs @@ -4,34 +4,24 @@ public class GetAllUserCartResponseDto //متادیتا public MetaData MetaData { get; set; } //مدل خروجی - public List? Models { get; set; } + public List? Models { get; set; } -}public class GetAllProductsByFilterResponseModel +}public class GetAllUserCartResponseModel { // public long Id { get; set; } // - public string Title { get; set; } + public string ProductTitle { get; set; } // - public string Description { get; set; } + public string ProductShortInfomation { get; set; } // - public string ShortInfomation { get; set; } + public long ProductPrice { get; set; } // - public string FullInformation { get; set; } + public int ProductDiscount { get; set; } // - public long Price { get; set; } + public string ProductThumbnailPath { get; set; } // - public int Discount { get; set; } + public int Count { get; set; } // - public int Rate { get; set; } - // - public string ImagePath { get; set; } - // - public string ThumbnailPath { get; set; } - // - public int SaleCount { get; set; } - // - public int ViewCount { get; set; } - // - public int RemainingCount { get; set; } + public DateTime Created { get; set; } } diff --git a/src/Protobufs/FrontOffice.BFF.ShopingCart.Protobuf/Protos/shopingcart.proto b/src/Protobufs/FrontOffice.BFF.ShopingCart.Protobuf/Protos/shopingcart.proto index 8b2e354..14310bc 100644 --- a/src/Protobufs/FrontOffice.BFF.ShopingCart.Protobuf/Protos/shopingcart.proto +++ b/src/Protobufs/FrontOffice.BFF.ShopingCart.Protobuf/Protos/shopingcart.proto @@ -39,23 +39,18 @@ message AddNewUserCartRequest message GetAllUserCartResponse { MetaData meta_data = 1; - repeated GetAllProductsByFilterResponseModel models = 2; + repeated GetAllUserCartResponseModel models = 2; } -message GetAllProductsByFilterResponseModel +message GetAllUserCartResponseModel { int64 id = 1; - string title = 2; - string description = 3; - string short_infomation = 4; - string full_information = 5; - int64 price = 6; - int32 discount = 7; - int32 rate = 8; - string image_path = 9; - string thumbnail_path = 10; - int32 sale_count = 11; - int32 view_count = 12; - int32 remaining_count = 13; + string product_title = 2; + string product_short_infomation = 3; + int64 product_price = 4; + int32 product_discount = 5; + string product_thumbnail_path = 6; + int32 count = 7; + google.protobuf.Timestamp created = 8; } message UpdateUserCartRequest {