map identifiers for consistency

parent 30aec93d
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10171" systemVersion="15E65" minimumToolsVersion="Xcode 7.0"> <model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="10174" systemVersion="15F34" minimumToolsVersion="Xcode 7.0">
<entity name="Address" representedClassName="BUYAddress" syncable="YES"> <entity name="Address" representedClassName="BUYAddress" syncable="YES">
<attribute name="address1" optional="YES" attributeType="String" syncable="YES"> <attribute name="address1" optional="YES" attributeType="String" syncable="YES">
<userInfo> <userInfo>
...@@ -314,11 +314,6 @@ ...@@ -314,11 +314,6 @@
</userInfo> </userInfo>
</entity> </entity>
<entity name="Collection" representedClassName="BUYCollection" syncable="YES"> <entity name="Collection" representedClassName="BUYCollection" syncable="YES">
<attribute name="collectionId" optional="YES" attributeType="Integer 64" defaultValueString="0" syncable="YES">
<userInfo>
<entry key="documentation" value="The unique collection ID in the channel."/>
</userInfo>
</attribute>
<attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/> <attribute name="createdAt" optional="YES" attributeType="Date" syncable="YES"/>
<attribute name="handle" optional="YES" attributeType="String" syncable="YES"> <attribute name="handle" optional="YES" attributeType="String" syncable="YES">
<userInfo> <userInfo>
...@@ -332,7 +327,12 @@ ...@@ -332,7 +327,12 @@
<entry key="JSONPropertyKey" value="body_html"/> <entry key="JSONPropertyKey" value="body_html"/>
</userInfo> </userInfo>
</attribute> </attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/> <attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES">
<userInfo>
<entry key="documentation" value="Maps to collection_id in the JSON"/>
<entry key="JSONPropertyKey" value="collection_id"/>
</userInfo>
</attribute>
<attribute name="published" optional="YES" attributeType="Boolean" syncable="YES"> <attribute name="published" optional="YES" attributeType="Boolean" syncable="YES">
<userInfo> <userInfo>
<entry key="documentation" value="The state of whether the collection is currently published or not."/> <entry key="documentation" value="The state of whether the collection is currently published or not."/>
...@@ -694,10 +694,10 @@ ...@@ -694,10 +694,10 @@
<entry key="JSONPropertyKey" value="body_html"/> <entry key="JSONPropertyKey" value="body_html"/>
</userInfo> </userInfo>
</attribute> </attribute>
<attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES"/> <attribute name="identifier" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES">
<attribute name="productId" optional="YES" attributeType="Integer 64" defaultValueString="0" indexed="YES" syncable="YES">
<userInfo> <userInfo>
<entry key="documentation" value="The channel product ID."/> <entry key="documentation" value="Maps to product_id in the JSON"/>
<entry key="JSONPropertyKey" value="product_id"/>
</userInfo> </userInfo>
</attribute> </attribute>
<attribute name="productType" optional="YES" attributeType="String" syncable="YES"> <attribute name="productType" optional="YES" attributeType="String" syncable="YES">
...@@ -994,7 +994,7 @@ ...@@ -994,7 +994,7 @@
<element name="CartLineItem" positionX="-380" positionY="558" width="128" height="90"/> <element name="CartLineItem" positionX="-380" positionY="558" width="128" height="90"/>
<element name="Checkout" positionX="333" positionY="442" width="128" height="630"/> <element name="Checkout" positionX="333" positionY="442" width="128" height="630"/>
<element name="CheckoutAttribute" positionX="-954" positionY="594" width="128" height="90"/> <element name="CheckoutAttribute" positionX="-954" positionY="594" width="128" height="90"/>
<element name="Collection" positionX="-963" positionY="772" width="128" height="210"/> <element name="Collection" positionX="-963" positionY="772" width="128" height="195"/>
<element name="Customer" positionX="106" positionY="1263" width="128" height="330"/> <element name="Customer" positionX="106" positionY="1263" width="128" height="330"/>
<element name="Discount" positionX="126" positionY="877" width="128" height="105"/> <element name="Discount" positionX="126" positionY="877" width="128" height="105"/>
<element name="GiftCard" positionX="531" positionY="862" width="128" height="135"/> <element name="GiftCard" positionX="531" positionY="862" width="128" height="135"/>
...@@ -1004,7 +1004,7 @@ ...@@ -1004,7 +1004,7 @@
<element name="Option" positionX="-576" positionY="907" width="128" height="105"/> <element name="Option" positionX="-576" positionY="907" width="128" height="105"/>
<element name="OptionValue" positionX="-387" positionY="907" width="128" height="105"/> <element name="OptionValue" positionX="-387" positionY="907" width="128" height="105"/>
<element name="Order" positionX="682" positionY="922" width="128" height="180"/> <element name="Order" positionX="682" positionY="922" width="128" height="180"/>
<element name="Product" positionX="-765" positionY="712" width="128" height="315"/> <element name="Product" positionX="-765" positionY="712" width="128" height="300"/>
<element name="ProductVariant" positionX="-182" positionY="787" width="128" height="240"/> <element name="ProductVariant" positionX="-182" positionY="787" width="128" height="240"/>
<element name="ShippingRate" positionX="531" positionY="1035" width="128" height="135"/> <element name="ShippingRate" positionX="531" positionY="1035" width="128" height="135"/>
<element name="Shop" positionX="-279" positionY="450" width="128" height="255"/> <element name="Shop" positionX="-279" positionY="450" width="128" height="255"/>
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#import "BUYModelManager.h" #import "BUYModelManager.h"
extern const struct BUYCollectionAttributes { extern const struct BUYCollectionAttributes {
__unsafe_unretained NSString *collectionId;
__unsafe_unretained NSString *createdAt; __unsafe_unretained NSString *createdAt;
__unsafe_unretained NSString *handle; __unsafe_unretained NSString *handle;
__unsafe_unretained NSString *htmlDescription; __unsafe_unretained NSString *htmlDescription;
...@@ -68,15 +67,6 @@ extern const struct BUYCollectionUserInfo { ...@@ -68,15 +67,6 @@ extern const struct BUYCollectionUserInfo {
@interface _BUYCollection : BUYCachedObject @interface _BUYCollection : BUYCachedObject
+ (NSString *)entityName; + (NSString *)entityName;
/**
* The unique collection ID in the channel.
*/
@property (nonatomic, strong) NSNumber* collectionId;
@property (atomic) int64_t collectionIdValue;
- (int64_t)collectionIdValue;
- (void)setCollectionIdValue:(int64_t)value_;
@property (nonatomic, strong) NSDate* createdAt; @property (nonatomic, strong) NSDate* createdAt;
/** /**
...@@ -91,6 +81,9 @@ extern const struct BUYCollectionUserInfo { ...@@ -91,6 +81,9 @@ extern const struct BUYCollectionUserInfo {
*/ */
@property (nonatomic, strong) NSString* htmlDescription; @property (nonatomic, strong) NSString* htmlDescription;
/**
* Maps to collection_id in the JSON
*/
@property (nonatomic, strong) NSNumber* identifier; @property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue; @property (atomic) int64_t identifierValue;
...@@ -141,9 +134,6 @@ extern const struct BUYCollectionUserInfo { ...@@ -141,9 +134,6 @@ extern const struct BUYCollectionUserInfo {
@interface _BUYCollection (CoreDataGeneratedPrimitiveAccessors) @interface _BUYCollection (CoreDataGeneratedPrimitiveAccessors)
- (NSNumber*)primitiveCollectionId;
- (void)setPrimitiveCollectionId:(NSNumber*)value;
- (NSDate*)primitiveCreatedAt; - (NSDate*)primitiveCreatedAt;
- (void)setPrimitiveCreatedAt:(NSDate*)value; - (void)setPrimitiveCreatedAt:(NSDate*)value;
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#import "_BUYCollection.h" #import "_BUYCollection.h"
const struct BUYCollectionAttributes BUYCollectionAttributes = { const struct BUYCollectionAttributes BUYCollectionAttributes = {
.collectionId = @"collectionId",
.createdAt = @"createdAt", .createdAt = @"createdAt",
.handle = @"handle", .handle = @"handle",
.htmlDescription = @"htmlDescription", .htmlDescription = @"htmlDescription",
...@@ -58,11 +57,6 @@ const struct BUYCollectionUserInfo BUYCollectionUserInfo = { ...@@ -58,11 +57,6 @@ const struct BUYCollectionUserInfo BUYCollectionUserInfo = {
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key { + (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key]; NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
if ([key isEqualToString:@"collectionIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"collectionId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"identifierValue"]) { if ([key isEqualToString:@"identifierValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"identifier"]; NSSet *affectingKey = [NSSet setWithObject:@"identifier"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey]; keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
...@@ -78,19 +72,6 @@ const struct BUYCollectionUserInfo BUYCollectionUserInfo = { ...@@ -78,19 +72,6 @@ const struct BUYCollectionUserInfo BUYCollectionUserInfo = {
} }
#if defined CORE_DATA_PERSISTENCE #if defined CORE_DATA_PERSISTENCE
- (NSNumber*)collectionId {
[self willAccessValueForKey:@"collectionId"];
id value = [self primitiveValueForKey:@"collectionId"];
[self didAccessValueForKey:@"collectionId"];
return value;
}
- (void)setCollectionId:(NSNumber*)value_ {
[self willChangeValueForKey:@"collectionId"];
[self setPrimitiveValue:value_ forKey:@"collectionId"];
[self didChangeValueForKey:@"collectionId"];
}
- (NSDate*)createdAt { - (NSDate*)createdAt {
[self willAccessValueForKey:@"createdAt"]; [self willAccessValueForKey:@"createdAt"];
id value = [self primitiveValueForKey:@"createdAt"]; id value = [self primitiveValueForKey:@"createdAt"];
...@@ -197,15 +178,6 @@ const struct BUYCollectionUserInfo BUYCollectionUserInfo = { ...@@ -197,15 +178,6 @@ const struct BUYCollectionUserInfo BUYCollectionUserInfo = {
#endif #endif
- (int64_t)collectionIdValue {
NSNumber *result = [self collectionId];
return [result longLongValue];
}
- (void)setCollectionIdValue:(int64_t)value_ {
[self setCollectionId:@(value_)];
}
- (int64_t)identifierValue { - (int64_t)identifierValue {
NSNumber *result = [self identifier]; NSNumber *result = [self identifier];
return [result longLongValue]; return [result longLongValue];
......
...@@ -36,7 +36,6 @@ extern const struct BUYProductAttributes { ...@@ -36,7 +36,6 @@ extern const struct BUYProductAttributes {
__unsafe_unretained NSString *handle; __unsafe_unretained NSString *handle;
__unsafe_unretained NSString *htmlDescription; __unsafe_unretained NSString *htmlDescription;
__unsafe_unretained NSString *identifier; __unsafe_unretained NSString *identifier;
__unsafe_unretained NSString *productId;
__unsafe_unretained NSString *productType; __unsafe_unretained NSString *productType;
__unsafe_unretained NSString *publicURL; __unsafe_unretained NSString *publicURL;
__unsafe_unretained NSString *published; __unsafe_unretained NSString *published;
...@@ -107,6 +106,9 @@ extern const struct BUYProductUserInfo { ...@@ -107,6 +106,9 @@ extern const struct BUYProductUserInfo {
*/ */
@property (nonatomic, strong) NSString* htmlDescription; @property (nonatomic, strong) NSString* htmlDescription;
/**
* Maps to product_id in the JSON
*/
@property (nonatomic, strong) NSNumber* identifier; @property (nonatomic, strong) NSNumber* identifier;
@property (atomic) int64_t identifierValue; @property (atomic) int64_t identifierValue;
...@@ -114,15 +116,6 @@ extern const struct BUYProductUserInfo { ...@@ -114,15 +116,6 @@ extern const struct BUYProductUserInfo {
- (void)setIdentifierValue:(int64_t)value_; - (void)setIdentifierValue:(int64_t)value_;
/** /**
* The channel product ID.
*/
@property (nonatomic, strong) NSNumber* productId;
@property (atomic) int64_t productIdValue;
- (int64_t)productIdValue;
- (void)setProductIdValue:(int64_t)value_;
/**
* A categorization that a product can be tagged with, commonly used for filtering and searching. * A categorization that a product can be tagged with, commonly used for filtering and searching.
*/ */
@property (nonatomic, strong) NSString* productType; @property (nonatomic, strong) NSString* productType;
...@@ -254,9 +247,6 @@ extern const struct BUYProductUserInfo { ...@@ -254,9 +247,6 @@ extern const struct BUYProductUserInfo {
- (NSNumber*)primitiveIdentifier; - (NSNumber*)primitiveIdentifier;
- (void)setPrimitiveIdentifier:(NSNumber*)value; - (void)setPrimitiveIdentifier:(NSNumber*)value;
- (NSNumber*)primitiveProductId;
- (void)setPrimitiveProductId:(NSNumber*)value;
- (NSString*)primitiveProductType; - (NSString*)primitiveProductType;
- (void)setPrimitiveProductType:(NSString*)value; - (void)setPrimitiveProductType:(NSString*)value;
......
...@@ -34,7 +34,6 @@ const struct BUYProductAttributes BUYProductAttributes = { ...@@ -34,7 +34,6 @@ const struct BUYProductAttributes BUYProductAttributes = {
.handle = @"handle", .handle = @"handle",
.htmlDescription = @"htmlDescription", .htmlDescription = @"htmlDescription",
.identifier = @"identifier", .identifier = @"identifier",
.productId = @"productId",
.productType = @"productType", .productType = @"productType",
.publicURL = @"publicURL", .publicURL = @"publicURL",
.published = @"published", .published = @"published",
...@@ -75,11 +74,6 @@ const struct BUYProductUserInfo BUYProductUserInfo = { ...@@ -75,11 +74,6 @@ const struct BUYProductUserInfo BUYProductUserInfo = {
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey]; keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths; return keyPaths;
} }
if ([key isEqualToString:@"productIdValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"productId"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
return keyPaths;
}
if ([key isEqualToString:@"publishedValue"]) { if ([key isEqualToString:@"publishedValue"]) {
NSSet *affectingKey = [NSSet setWithObject:@"published"]; NSSet *affectingKey = [NSSet setWithObject:@"published"];
keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey]; keyPaths = [keyPaths setByAddingObjectsFromSet:affectingKey];
...@@ -155,19 +149,6 @@ const struct BUYProductUserInfo BUYProductUserInfo = { ...@@ -155,19 +149,6 @@ const struct BUYProductUserInfo BUYProductUserInfo = {
[self didChangeValueForKey:@"identifier"]; [self didChangeValueForKey:@"identifier"];
} }
- (NSNumber*)productId {
[self willAccessValueForKey:@"productId"];
id value = [self primitiveValueForKey:@"productId"];
[self didAccessValueForKey:@"productId"];
return value;
}
- (void)setProductId:(NSNumber*)value_ {
[self willChangeValueForKey:@"productId"];
[self setPrimitiveValue:value_ forKey:@"productId"];
[self didChangeValueForKey:@"productId"];
}
- (NSString*)productType { - (NSString*)productType {
[self willAccessValueForKey:@"productType"]; [self willAccessValueForKey:@"productType"];
id value = [self primitiveValueForKey:@"productType"]; id value = [self primitiveValueForKey:@"productType"];
...@@ -292,15 +273,6 @@ const struct BUYProductUserInfo BUYProductUserInfo = { ...@@ -292,15 +273,6 @@ const struct BUYProductUserInfo BUYProductUserInfo = {
[self setIdentifier:@(value_)]; [self setIdentifier:@(value_)];
} }
- (int64_t)productIdValue {
NSNumber *result = [self productId];
return [result longLongValue];
}
- (void)setProductIdValue:(int64_t)value_ {
[self setProductId:@(value_)];
}
- (BOOL)publishedValue { - (BOOL)publishedValue {
NSNumber *result = [self published]; NSNumber *result = [self published];
return [result boolValue]; return [result boolValue];
......
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