mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Refactored models and cleaned up controllers pretty thoroughly. Moved to higher level abstractions for permissions and such
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user