Commit 6c9ff8a5 by lee

修改CoreData

parent b9fcf3f5
......@@ -122,6 +122,7 @@
result.size = shopCartModel.size;
result.quantity = shopCartModel.quantity;
result.price = shopCartModel.price;
result.product_id = shopCartModel.product_id.stringValue;
result.shopCartDict = shopCartModel.shopCartDict;
}
return result;
......@@ -139,6 +140,7 @@
result.size = shopCartItem.size;
result.quantity = shopCartItem.quantity;
result.shopCartDict = shopCartItem.shopCartDict;
result.product_id = @(shopCartItem.product_id.integerValue);
return result;
}
......
......@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, nonatomic, copy) NSString *brand;
@property (nullable, nonatomic, copy) NSString *name;
@property (nullable, nonatomic, copy) NSString *size;
@property (nullable, nonatomic, copy) NSString *product_id;
@property (nonatomic) NSInteger quantity;
@property (nonatomic) float price;
@property (nullable, nonatomic, retain) NSDictionary *shopCartDict;
......
......@@ -18,6 +18,7 @@
@dynamic imageStr;
@dynamic brand;
@dynamic name;
@dynamic product_id;
@dynamic size;
@dynamic quantity;
@dynamic price;
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11232" systemVersion="15G1004" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="">
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12141" systemVersion="16E195" minimumToolsVersion="Automatic" sourceLanguage="Objective-C" userDefinedModelVersionIdentifier="">
<entity name="KWMShopCartItem" representedClassName="KWMShopCartItem" syncable="YES">
<attribute name="brand" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="identifier" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="imageStr" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="price" optional="YES" attributeType="Float" defaultValueString="0.0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="product_id" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="quantity" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="shopCartDict" optional="YES" attributeType="Transformable" syncable="YES"/>
<attribute name="size" optional="YES" attributeType="String" syncable="YES"/>
</entity>
<elements>
<element name="KWMShopCartItem" positionX="-63" positionY="-18" width="128" height="165"/>
<element name="KWMShopCartItem" positionX="-63" positionY="-18" width="128" height="180"/>
</elements>
</model>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment