//
//  StatusAuthorizationService.h
//  EAMNext
//
//  Created by Deepa Vaidhyanathan on 4/15/20.
//

#ifndef StatusAuthorizationService_h
#define StatusAuthorizationService_h


#endif /* StatusAuthorizationService_h */


#import "BaseService.h"
#import "RecordData.h"

@interface StatusAuthorizationService : BaseService

- (instancetype)initWithName:(RecordData *) pModel;
- (BOOL)addStatusAuthRec:(NSString *) pNewStatus oldStatus:(NSString *)pOldStatus;
- (int)getMaxQueueID;
- (BOOL)updateStatusAuthRec:(NSString *) pNewStatus oldStatus:(NSString *)pOldStatus forQueueID:(int)iLastQueueID;
-(int)getStatusAuthQueueID:(NSString *)pNewStatus;
-(void) setModel:(RecordData *) pModel;
- (BOOL)deleteStatusAuthRecordsForEntityDeletion;
-(NSMutableDictionary *)getStatusesForQueueID:(NSString *)QueueID;
+ (BOOL)deleteStatusAuthRecordBasedOnQueueID :(NSString *) pQueueId;
+ (BOOL)hasMoreStatusAuthRecords :(NSString *) pQueueId;
-(bool) isStatusInHistoryForKey :(NSString *) pStatus;
-(bool) isStatusInR5QueueForKeys :(NSString *) pTableKey forParamKey:(NSString *) pParamKey;
- (NSString *)getRollbackQueueId:(NSDictionary *)getParams;
+ (BOOL) isLastStatusAuthRecordForEntityInQueue :(NSString *) pQueueId;
-(BOOL) hasDuplicateRecordsForStatus :(NSString *) pNewStatus andForOld:(NSString *) pOldStatus;

@end
