Files
keyboard/keyBoard/Class/AiTalk/M/KBCommentModel.h

76 lines
2.0 KiB
C
Raw Normal View History

2026-01-27 21:32:52 +08:00
//
// KBCommentModel.h
// keyBoard
//
// Created by Kiro on 2026/1/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#pragma mark - 评论项模型
@interface KBCommentItem : NSObject
/// 评论 ID
@property (nonatomic, assign) NSInteger commentId;
/// AI 陪聊角色 ID
@property (nonatomic, assign) NSInteger companionId;
/// 评论内容
@property (nonatomic, copy, nullable) NSString *content;
/// 创建时间
@property (nonatomic, copy, nullable) NSString *createdAt;
/// 点赞数
@property (nonatomic, assign) NSInteger likeCount;
/// 是否已点赞0=未点赞1=已点赞)
@property (nonatomic, assign) NSInteger liked;
/// 父评论 ID一级评论为 null
@property (nonatomic, strong, nullable) NSNumber *parentId;
/// 根评论 ID用于标识评论线程
@property (nonatomic, strong, nullable) NSNumber *rootId;
/// 回复列表
@property (nonatomic, strong, nullable) NSArray<KBCommentItem *> *replies;
/// 回复数量
@property (nonatomic, assign) NSInteger replyCount;
/// 用户头像
@property (nonatomic, copy, nullable) NSString *userAvatar;
/// 用户 ID
@property (nonatomic, assign) NSInteger userId;
/// 用户名
@property (nonatomic, copy, nullable) NSString *userName;
@end
#pragma mark - 评论分页模型
@interface KBCommentPageModel : NSObject
/// 当前页码
@property (nonatomic, assign) NSInteger current;
/// 总页数
@property (nonatomic, assign) NSInteger pages;
/// 每页大小
@property (nonatomic, assign) NSInteger size;
/// 总记录数
@property (nonatomic, assign) NSInteger total;
/// 评论列表
@property (nonatomic, strong, nullable) NSArray<KBCommentItem *> *records;
@end
#pragma mark - 点赞响应模型
@interface KBCommentLikeResponse : NSObject
/// 响应码0=成功)
@property (nonatomic, assign) NSInteger code;
/// 响应消息
@property (nonatomic, copy, nullable) NSString *message;
/// 点赞结果true=点赞成功false=取消点赞成功)
@property (nonatomic, assign) BOOL data;
@end
NS_ASSUME_NONNULL_END