package shop.alien.entity.store.dto;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 打卡推荐 feeds 列表单项（与 Redis snake_case JSON 对齐；{@code type}/{@code dynamics_type} 固定为 5）。
 * <p>
 * 商户维度：{@code is_follow_me}/{@code is_follow_this}；打卡发布用户维度：{@code is_publisher_follow_me}/{@code is_follow_publisher}；
 * {@code fans_count} 与关联门店 {@code phone_id} 侧粉丝数对应；{@code is_like}/{@code dianzan_count} 为当前用户对「本条打卡」的点赞状态与总赞数。
 * </p>
 */
@Data
@NoArgsConstructor
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@ApiModel(description = "打卡推荐 feeds 列表项")
public class LifeClockInFeedItemDto {

    @ApiModelProperty("打卡 ID，store_clock_in.id")
    private Integer id;

    @ApiModelProperty("门店 phone_id（store_{手机号}）")
    private String phoneId;

    @ApiModelProperty("标题，打卡场景一般为 null")
    private String title;

    @ApiModelProperty("打卡文案，store_clock_in.content")
    private String context;

    @ApiModelProperty("主图 URL，逗号分隔原图")
    private String imagePath;

    @ApiModelProperty("坐标")
    private String address;

    @ApiModelProperty("地址详情")
    private String addressContext;

    @ApiModelProperty("地点名")
    private String addressName;

    @ApiModelProperty("浏览数 store_clock_in.view_count")
    private Integer liulanCount;

    @ApiModelProperty(value = "点赞总数（int）。本条打卡累计点赞数，对应 store_clock_in.like_count（JSON 亦可映射为 dianzan_count）", example = "0")
    private Integer dianzanCount;

    @ApiModelProperty("打卡类型固定 5")
    private String type;

    @ApiModelProperty("0 非草稿")
    private Integer draft;

    @ApiModelProperty("0 未删除")
    private Integer deleteFlag;

    @ApiModelProperty("创建时间 ISO8601")
    private String createdTime;

    @ApiModelProperty("打卡人 life_user.id，对应 store_clock_in.user_id")
    private Integer createdUserId;

    @ApiModelProperty("更新时间 ISO8601")
    private String updatedTime;

    @ApiModelProperty("更新人")
    private Integer updatedUserId;

    @ApiModelProperty("未实现时可 null")
    private String isBlack;

    @ApiModelProperty("门店省+市，用于 cityname 过滤")
    private String addressProvince;

    @ApiModelProperty("置顶状态")
    private Integer topStatus;

    @ApiModelProperty("置顶时间")
    private String topTime;

    @ApiModelProperty("启用状态")
    private Integer enableStatus;

    @ApiModelProperty("达人 ID")
    private Integer expertId;

    @ApiModelProperty("业务 ID")
    private Integer businessId;

    @ApiModelProperty("转发数")
    private Integer transferCount;

    @ApiModelProperty("实际浏览")
    private Integer realityCount;

    @ApiModelProperty("审核状态，2=审核完成")
    private Integer checkFlag;

    @ApiModelProperty("AI 审核任务 ID")
    private String aiTaskId;

    @ApiModelProperty("审核失败原因")
    private String reason;

    @ApiModelProperty("封面")
    private String coverImage;

    @ApiModelProperty("store_info.id")
    private String storeId;

    @ApiModelProperty("打卡人昵称 life_user.user_name")
    private String userName;

    @ApiModelProperty("打卡人头像 life_user.user_image")
    private String userImage;

    @ApiModelProperty(value = "商户维度：门店商家是否关注我。0/1（life_fans，store_ phone_id；等价 snake_case: is_follow_me）")
    private String isFollowMe;

    @ApiModelProperty(value = "商户维度：我是否关注门店商家。0/1（life_fans，store_ phone_id；等价 snake_case: is_follow_this）")
    private String isFollowThis;

    @ApiModelProperty(value = "打卡独有：打卡发布用户是否关注我。0/1（life_fans fans_type=1，user_ phone_id；snake_case: is_publisher_follow_me）")
    private String isPublisherFollowMe;

    @ApiModelProperty(value = "打卡独有：我是否关注打卡发布用户。0/1（life_fans fans_type=1，user_ phone_id；snake_case: is_follow_publisher）")
    private String isFollowPublisher;

    @ApiModelProperty(value = "当前用户是否点赞本条打卡。0/1（life_like_record type=5；snake_case: is_like）")
    private String isLike;

    @ApiModelProperty("评论数")
    private Integer commentCount;

    @ApiModelProperty("商家 store_user.id（非打卡人 id）")
    private String storeOrUserId;

    @ApiModelProperty("0/1 是否达人")
    private String isExpert;

    @ApiModelProperty(value = "对方粉丝数（int，可为 null）。动态+打卡通用语义：与关联门店 phone_id（商户维度）对应的粉丝量（snake_case: fans_count）")
    private Integer fansCount;

    @ApiModelProperty("未使用")
    private String userType;

    @ApiModelProperty("与 type 一致，打卡固定 5")
    private String dynamicsType;

    @ApiModelProperty("由 imagePath 拆分")
    private List<String> imagePathList;

    @ApiModelProperty("门店名称")
    private String storeName;

    @ApiModelProperty("门店简介")
    private String storeBlurb;

    @ApiModelProperty("店铺平均分")
    private Double scoreAvg;

    @ApiModelProperty("经营板块")
    private String businessSection;

    @ApiModelProperty("评价数量（字符串）")
    private String ratingCount;

    @ApiModelProperty("经营种类")
    private String businessTypeName;
}
