Skip to content

Commit 60f8d4d

Browse files
committed
Model
1 parent 9d2a410 commit 60f8d4d

24 files changed

Lines changed: 407 additions & 15 deletions

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@
9999
4E4D6A851B1C6D8200FD2E49 /* FileChangeListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A841B1C6D8200FD2E49 /* FileChangeListCell.m */; };
100100
4E4D6A881B1C6E1B00FD2E49 /* MRPRAcceptEditCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A871B1C6E1B00FD2E49 /* MRPRAcceptEditCell.m */; };
101101
4E4D6A8B1B1C6E3100FD2E49 /* MRPRAcceptCheckCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A8A1B1C6E3000FD2E49 /* MRPRAcceptCheckCell.m */; };
102+
4E4D6A8E1B1D5B9A00FD2E49 /* MRPRBaseInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A8D1B1D5B9A00FD2E49 /* MRPRBaseInfo.m */; };
103+
4E4D6A911B1D84B400FD2E49 /* FileChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A901B1D84B400FD2E49 /* FileChange.m */; };
104+
4E4D6A941B1D851E00FD2E49 /* FileChanges.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A931B1D851E00FD2E49 /* FileChanges.m */; };
105+
4E4D6A9A1B1D893500FD2E49 /* CommitInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A991B1D893500FD2E49 /* CommitInfo.m */; };
106+
4E4D6A9D1B1D898800FD2E49 /* CommitComment.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A9C1B1D898800FD2E49 /* CommitComment.m */; };
107+
4E4D6AA01B1D89D400FD2E49 /* CommitDetail.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6A9F1B1D89D400FD2E49 /* CommitDetail.m */; };
108+
4E4D6AA31B1DB63A00FD2E49 /* FileLineChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E4D6AA21B1DB63A00FD2E49 /* FileLineChange.m */; };
102109
4E53EB521AFA03990034FE1C /* RKSwipeBetweenViewControllers.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E53EB511AFA03990034FE1C /* RKSwipeBetweenViewControllers.m */; };
103110
4E53EB591AFB090E0034FE1C /* nav_page_selected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E53EB571AFB090E0034FE1C /* nav_page_selected@2x.png */; };
104111
4E53EB5A1AFB090E0034FE1C /* nav_page_unselected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E53EB581AFB090E0034FE1C /* nav_page_unselected@2x.png */; };
@@ -823,6 +830,20 @@
823830
4E4D6A871B1C6E1B00FD2E49 /* MRPRAcceptEditCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRPRAcceptEditCell.m; sourceTree = "<group>"; };
824831
4E4D6A891B1C6E3000FD2E49 /* MRPRAcceptCheckCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRPRAcceptCheckCell.h; sourceTree = "<group>"; };
825832
4E4D6A8A1B1C6E3000FD2E49 /* MRPRAcceptCheckCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRPRAcceptCheckCell.m; sourceTree = "<group>"; };
833+
4E4D6A8C1B1D5B9A00FD2E49 /* MRPRBaseInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRPRBaseInfo.h; sourceTree = "<group>"; };
834+
4E4D6A8D1B1D5B9A00FD2E49 /* MRPRBaseInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRPRBaseInfo.m; sourceTree = "<group>"; };
835+
4E4D6A8F1B1D84B400FD2E49 /* FileChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileChange.h; sourceTree = "<group>"; };
836+
4E4D6A901B1D84B400FD2E49 /* FileChange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileChange.m; sourceTree = "<group>"; };
837+
4E4D6A921B1D851E00FD2E49 /* FileChanges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileChanges.h; sourceTree = "<group>"; };
838+
4E4D6A931B1D851E00FD2E49 /* FileChanges.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileChanges.m; sourceTree = "<group>"; };
839+
4E4D6A981B1D893500FD2E49 /* CommitInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommitInfo.h; sourceTree = "<group>"; };
840+
4E4D6A991B1D893500FD2E49 /* CommitInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommitInfo.m; sourceTree = "<group>"; };
841+
4E4D6A9B1B1D898800FD2E49 /* CommitComment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommitComment.h; sourceTree = "<group>"; };
842+
4E4D6A9C1B1D898800FD2E49 /* CommitComment.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommitComment.m; sourceTree = "<group>"; };
843+
4E4D6A9E1B1D89D400FD2E49 /* CommitDetail.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommitDetail.h; sourceTree = "<group>"; };
844+
4E4D6A9F1B1D89D400FD2E49 /* CommitDetail.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommitDetail.m; sourceTree = "<group>"; };
845+
4E4D6AA11B1DB63A00FD2E49 /* FileLineChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileLineChange.h; sourceTree = "<group>"; };
846+
4E4D6AA21B1DB63A00FD2E49 /* FileLineChange.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileLineChange.m; sourceTree = "<group>"; };
826847
4E53EB501AFA03990034FE1C /* RKSwipeBetweenViewControllers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKSwipeBetweenViewControllers.h; sourceTree = "<group>"; };
827848
4E53EB511AFA03990034FE1C /* RKSwipeBetweenViewControllers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKSwipeBetweenViewControllers.m; sourceTree = "<group>"; };
828849
4E53EB571AFB090E0034FE1C /* nav_page_selected@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nav_page_selected@2x.png"; sourceTree = "<group>"; };
@@ -3010,10 +3031,24 @@
30103031
4ECF70451B18557E000280FF /* MRPRS.m */,
30113032
4ECF70471B185BCC000280FF /* MRPR.h */,
30123033
4ECF70481B185BCC000280FF /* MRPR.m */,
3034+
4E4D6A8C1B1D5B9A00FD2E49 /* MRPRBaseInfo.h */,
3035+
4E4D6A8D1B1D5B9A00FD2E49 /* MRPRBaseInfo.m */,
30133036
4E4D6A501B1C555400FD2E49 /* MRPRComment.h */,
30143037
4E4D6A511B1C555400FD2E49 /* MRPRComment.m */,
30153038
4E4D6A531B1C55EB00FD2E49 /* MRPRCommentItem.h */,
30163039
4E4D6A541B1C55EB00FD2E49 /* MRPRCommentItem.m */,
3040+
4E4D6A8F1B1D84B400FD2E49 /* FileChange.h */,
3041+
4E4D6A901B1D84B400FD2E49 /* FileChange.m */,
3042+
4E4D6A921B1D851E00FD2E49 /* FileChanges.h */,
3043+
4E4D6A931B1D851E00FD2E49 /* FileChanges.m */,
3044+
4E4D6A981B1D893500FD2E49 /* CommitInfo.h */,
3045+
4E4D6A991B1D893500FD2E49 /* CommitInfo.m */,
3046+
4E4D6A9B1B1D898800FD2E49 /* CommitComment.h */,
3047+
4E4D6A9C1B1D898800FD2E49 /* CommitComment.m */,
3048+
4E4D6A9E1B1D89D400FD2E49 /* CommitDetail.h */,
3049+
4E4D6A9F1B1D89D400FD2E49 /* CommitDetail.m */,
3050+
4E4D6AA11B1DB63A00FD2E49 /* FileLineChange.h */,
3051+
4E4D6AA21B1DB63A00FD2E49 /* FileLineChange.m */,
30173052
);
30183053
path = Models;
30193054
sourceTree = "<group>";
@@ -3998,6 +4033,7 @@
39984033
8EF643D319FF7E2900F7EEB0 /* ValueListCell.m in Sources */,
39994034
4E217F0C1A70EDC700F6DF88 /* SVModalWebViewController.m in Sources */,
40004035
4EA7F1601A6D192B00A046BD /* SDWebImagePrefetcher.m in Sources */,
4036+
4E4D6A941B1D851E00FD2E49 /* FileChanges.m in Sources */,
40014037
4E6BA2E81A1EE6AF005FD721 /* UIWebView+AFNetworking.m in Sources */,
40024038
4E4D6A7F1B1C6D1E00FD2E49 /* CommitContentCell.m in Sources */,
40034039
8EA6D13519E240C40076D59C /* ProjectViewController.m in Sources */,
@@ -4016,6 +4052,7 @@
40164052
4E4D6A611B1C65C100FD2E49 /* MRPRCommitsViewController.m in Sources */,
40174053
8E64ED7D19ED0CE3006E99DA /* QBAssetsCollectionOverlayView.m in Sources */,
40184054
8EA6D14919E240C40076D59C /* UserTweetsViewController.m in Sources */,
4055+
4E4D6AA01B1D89D400FD2E49 /* CommitDetail.m in Sources */,
40194056
4ECE8AD71A3943E80021E29C /* DownMenuCell.m in Sources */,
40204057
4E6C41201A846AC30098DC17 /* RFToolbarButton.m in Sources */,
40214058
3A3878491AE36ED70078D5DE /* TopicListButton.m in Sources */,
@@ -4103,6 +4140,7 @@
41034140
8EA6D12D19E240C40076D59C /* ConversationViewController.m in Sources */,
41044141
4EDC33CE1AFB4DCC00698315 /* EaseInputTipsView.m in Sources */,
41054142
4ECE8ADB1A3943E80021E29C /* NSDate+convenience.m in Sources */,
4143+
4E4D6AA31B1DB63A00FD2E49 /* FileLineChange.m in Sources */,
41064144
4E5C06EE1AC4405300F427C5 /* PasswordViewController.m in Sources */,
41074145
4E4D6A551B1C55EB00FD2E49 /* MRPRCommentItem.m in Sources */,
41084146
4E217F0E1A70EDC700F6DF88 /* SVWebViewController.m in Sources */,
@@ -4112,6 +4150,7 @@
41124150
8EF643AC19FF7E2900F7EEB0 /* TweetLikeUserCCell.m in Sources */,
41134151
8E64ED7B19ED0CE3006E99DA /* QBAssetsCollectionCheckmarkView.m in Sources */,
41144152
4E4D6A701B1C68F100FD2E49 /* CommitFilesViewController.m in Sources */,
4153+
4E4D6A911B1D84B400FD2E49 /* FileChange.m in Sources */,
41154154
8EA6D1AB19E240C40076D59C /* main.m in Sources */,
41164155
B94C1B691AC945D30000C271 /* NewProjectViewController.m in Sources */,
41174156
4E996BD91ABA776500C704F1 /* UserInfoTextCell.m in Sources */,
@@ -4147,6 +4186,8 @@
41474186
8EA6D1C319E240C40076D59C /* User.m in Sources */,
41484187
8EA6D1FB19E240C40076D59C /* MJPhotoToolbar.m in Sources */,
41494188
8EF643CF19FF7E2900F7EEB0 /* TweetDetailCommentCell.m in Sources */,
4189+
4E4D6A8E1B1D5B9A00FD2E49 /* MRPRBaseInfo.m in Sources */,
4190+
4E4D6A9A1B1D893500FD2E49 /* CommitInfo.m in Sources */,
41504191
4E38CF5F1A7A28AF005536C0 /* CodeBranchTagButton.m in Sources */,
41514192
8E64ED8119ED0CE3006E99DA /* QBAssetsCollectionViewLayout.m in Sources */,
41524193
8EA6D1C819E240C40076D59C /* UIBadgeView.m in Sources */,
@@ -4170,6 +4211,7 @@
41704211
8EA6D1BA19E240C40076D59C /* Projects.m in Sources */,
41714212
4E996BDF1ABA7CE100C704F1 /* UserInfoDetailUserCell.m in Sources */,
41724213
4EACB4461A2C60110097ABB3 /* ProjectActivities.m in Sources */,
4214+
4E4D6A9D1B1D898800FD2E49 /* CommitComment.m in Sources */,
41734215
8EA6D1CB19E240C40076D59C /* UITapImageView.m in Sources */,
41744216
4E217F171A70EDC700F6DF88 /* SVWebViewControllerActivity.m in Sources */,
41754217
4E996BE81ABBCD2D00C704F1 /* TaskDescriptionCell.m in Sources */,

Coding_iOS/Models/Commit.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
@interface Commit : NSObject
1313
@property (readwrite, nonatomic, strong) NSString *sha, *short_message;
14+
@property (strong, nonatomic) NSString *fullMessage, *shortMessage, *allMessage, *commitId;
15+
@property (strong, nonatomic) NSDate *commitTime;
16+
@property (strong, nonatomic) NSNumber *notesCount;
1417
@property (readwrite, nonatomic, strong) Committer *committer;
1518
- (NSString *)contentStr;
1619
@end

Coding_iOS/Models/CommitComment.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// CommitComment.h
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 15/6/2.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "User.h"
11+
12+
@interface CommitComment : NSObject
13+
@property (strong, nonatomic) User *author;
14+
@property (strong, nonatomic) NSString *anchor, *commitId, *content, *noteable_type, *path;
15+
@property (strong, nonatomic) NSDate *created_at;
16+
@property (strong, nonatomic) NSNumber *id, *line, *noteable_id, *position, *outdated;
17+
@property (readwrite, nonatomic, strong) HtmlMedia *htmlMedia;
18+
@end

Coding_iOS/Models/CommitComment.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// CommitComment.m
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 15/6/2.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import "CommitComment.h"
10+
11+
@implementation CommitComment
12+
- (void)setContent:(NSString *)content{
13+
if (_content != content) {
14+
_htmlMedia = [HtmlMedia htmlMediaWithString:content showType:MediaShowTypeAll];
15+
_content = _htmlMedia.contentDisplay;
16+
}
17+
}
18+
@end

Coding_iOS/Models/CommitDetail.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// CommitDetail.h
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 15/6/2.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import "Commit.h"
10+
#import "FileChanges.h"
11+
12+
@interface CommitDetail : Commit
13+
@property (strong, nonatomic) FileChanges *diffStat;
14+
15+
@end

Coding_iOS/Models/CommitDetail.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// CommitDetail.m
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 15/6/2.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import "CommitDetail.h"
10+
11+
@implementation CommitDetail
12+
13+
@end

Coding_iOS/Models/CommitInfo.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// CommitInfo.h
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 15/6/2.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "CommitComment.h"
11+
#import "CommitDetail.h"
12+
13+
@interface CommitInfo : NSObject
14+
@property (strong, nonatomic) CommitDetail *commitDetail;
15+
@property (strong, nonatomic) NSMutableArray *commitComments;
16+
@property (strong, nonatomic) NSDictionary *propertyArrayMap;
17+
@end

Coding_iOS/Models/CommitInfo.m

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// CommitInfo.m
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 15/6/2.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import "CommitInfo.h"
10+
11+
@implementation CommitInfo
12+
- (instancetype)init
13+
{
14+
self = [super init];
15+
if (self) {
16+
_propertyArrayMap = [NSDictionary dictionaryWithObjectsAndKeys:
17+
@"CommitComment", @"commitComments", nil];
18+
}
19+
return self;
20+
}
21+
@end

Coding_iOS/Models/Depot.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
#import <Foundation/Foundation.h>
1010

1111
@interface Depot : NSObject
12-
@property (readwrite, nonatomic, strong) NSString *name, *path;
12+
@property (strong, nonatomic) NSNumber *id;
13+
@property (readwrite, nonatomic, strong) NSString *name, *path, *depot_path, *default_branch;
1314
@end

Coding_iOS/Models/FileChange.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// FileChange.h
3+
// Coding_iOS
4+
//
5+
// Created by Ease on 15/6/2.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
@interface FileChange : NSObject
12+
@property (strong, nonatomic) NSNumber *insertions, *deletions, *size, *mode;
13+
@property (strong, nonatomic) NSString *changeType, *name, *path, *objectId, *commitId;
14+
@end

0 commit comments

Comments
 (0)