76 lines
2.0 KiB
Objective-C
76 lines
2.0 KiB
Objective-C
//
|
||
// 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
|