You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

54 lines
1.5 KiB

//
// TFCollectionManager.h
// WXReader
//
// Created by 谢腾飞 on 2020/12/1.
// Copyright © 2020 xtfei_2011@126.com. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface TFCollectionManager : NSObject
+ (instancetype)shareManagerWithProductionType:(TFProductionType)productionType;
#pragma add
// 添加收藏作品
- (BOOL)addCollectionWithProductionModel:(TFProductionModel *)productionModel;
- (BOOL)addCollectionWithProductionModel:(TFProductionModel *)productionModel atIndex:(NSInteger)index;
#pragma delete
// 删除收藏作品
- (BOOL)removeCollectionWithProductionModel:(TFProductionModel *)productionModel;
- (BOOL)removeCollectionWithProduction_id:(NSInteger)production_id;
// 删除全部收藏作品
- (BOOL)removeAllCollection;
#pragma change
// 修改本地作品记录
- (BOOL)modificationCollectionWithProductionModel:(TFProductionModel *)productionModel;
// 移动当前作品记录到首位
- (void)moveCollectionToTopWithProductionModel:(TFProductionModel *)productionModel;
#pragma check
// 本地全部作品记录
- (NSArray <TFProductionModel *> *)getAllCollection;
// 此作品是否已收藏
- (TFProductionModel * _Nullable)isCollectedWithProductionModel:(TFProductionModel *)productionModel;
// 获取作品收藏记录
- (TFProductionModel *)getCollectedProductionModelWithProduction_id:(NSInteger)production_id;
// 此作品是否已收藏
- (BOOL)isCollectedWithProduction_id:(NSInteger)production_id;
@end
NS_ASSUME_NONNULL_END