//
//  RCTRnUpdateResultParams.h
//  LocalApp
//
//  Created by xiaoyu on 2026/1/4.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface RCTRnUpdateResultParams : NSObject

@property (nonatomic, assign, readonly) NSInteger code;
@property (nonatomic, copy, readonly) NSString *msg;

/// 构造（私有）
- (instancetype)initWithCode:(NSInteger)code msg:(NSString *)msg;

/// 转成 RN 可用的 NSDictionary
- (NSDictionary *)toDictionary;

// 设置消息文字
- (NSDictionary *)toDictionaryWithMsg: (NSString *)msg;



#pragma mark - 枚举值（类方法）

+ (instancetype)success;
+ (instancetype)ppkVersionInstall;
+ (instancetype)ppkVersionUninstall;
+ (instancetype)ppkVersionUndownload;
+ (instancetype)errorNotExist;
+ (instancetype)errorParams;
+ (instancetype)errorRuntime;
// 构建一个消息体
+ (NSDictionary *)builder:(NSString *)code msg:(NSString *)msg;

@end

NS_ASSUME_NONNULL_END
