JXBlogObject.h 990 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // JXBlogObject.h
  3. // shiku_im
  4. //
  5. // Created by flyeagleTang on 14-5-31.
  6. // Copyright (c) 2014年 Reese. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #define kBLOG_UserID @"userId"
  10. #define kBLOG_MsgID @"msgId"
  11. #define kBLOG_Time @"time"
  12. #define XMPP_TYPE_NEWCHAT 600 //
  13. #define XMPP_TYPE_NEWGIFT 601 //
  14. #define XMPP_TYPE_NEWPRIASE 602 //
  15. #define XMPP_TYPE_NEWBLOG 603 //
  16. @interface JXBlogObject : NSObject{
  17. NSString* _tableName;
  18. }
  19. @property (nonatomic,strong) NSString* userId;
  20. @property (nonatomic,strong) NSString* msgId;
  21. @property (nonatomic,strong) NSDate* time;
  22. //数据库增删改查
  23. -(BOOL)insert;
  24. -(BOOL)delete;
  25. -(BOOL)update;
  26. +(JXBlogObject*)sharedInstance;
  27. //将对象转换为字典
  28. -(NSDictionary*)toDictionary;
  29. -(void)fromDataset:(JXBlogObject*)obj rs:(FMResultSet*)rs;
  30. -(void)fromDictionary:(JXBlogObject*)obj dict:(NSDictionary*)aDic;
  31. -(void)fromObject:(JXMessageObject*)message;
  32. -(BOOL)checkTableCreatedInDb:(FMDatabase *)db;
  33. @end