Refactored models and cleaned up controllers pretty thoroughly. Moved to higher level abstractions for permissions and such

This commit is contained in:
Blake Watters
2011-01-20 20:52:33 -05:00
parent 3474eb73b0
commit ebd23559bb
30 changed files with 289 additions and 251 deletions

View File

@@ -6,15 +6,13 @@
// Copyright 2011 Two Toasters. All rights reserved.
//
#import <RestKit/RestKit.h>
#import <RestKit/CoreData/CoreData.h>
#import "DBUser.h"
#import "DBContentObject.h"
/**
* Models a Topic in the Discussion Board. Users can
* create Post's on Topics to have discussions.
*/
@interface DBTopic : RKManagedObject {
@interface DBTopic : DBContentObject {
}
/**
@@ -22,30 +20,8 @@
*/
@property (nonatomic, retain) NSString* name;
/**
* A timestamp of when the object was created
*/
@property (nonatomic, retain) NSDate* createdAt;
/**
* A timestamp of when the object was last modified
*/
@property (nonatomic, retain) NSDate* updatedAt;
/**
* The username of the User who created this Topic
*/
@property (nonatomic, retain) NSString* username;
#pragma mark Relationship properties
/**
* The User who created this Topic within the Discussion Board.
* This is a Core Data relationship to the User object with the
* primary key value contained in the userID property
*/
@property (nonatomic, retain) DBUser* user;
/**
* The collection of Post objects that belong to this Topic. This is
* a Core Data relationship to the collection of Posts objects
@@ -58,14 +34,4 @@
*/
@property (nonatomic, retain) NSNumber* topicID;
/**
* The numeric primary key of the User who created this Topic
*/
@property (nonatomic, retain) NSNumber* userID;
/**
* Returns true if the record has not yet been saved/synced with the server.
*/
- (BOOL)isNewRecord;
@end