package com.sonic.frog.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 点赞表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("liked")
public class Liked {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 点赞内容的 Id
     */
    @TableField("biz_id")
    private Long bizId;

    /**
     * 点赞内容的类型 (ALBUM_PIC 等)
     */
    @TableField("biz_type")
    private BizType bizType;

    /**
     * 被点赞用户ai Id
     */
    @TableField("ai_id")
    private Long aiId;

    /**
     * 点赞用户 id
     */
    @TableField("liked_user_id")
    private Long likedUserId;

    /**
     * 点赞状态（LIKE已点赞、CANCELED取消点赞）
     */
    @TableField("liked_status")
    private LikedStatus likedStatus;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField("edit_time")
    private LocalDateTime editTime;


    public enum BizType {
        /** 点赞的内容 */
        ALBUM_PIC,
        AI,
        ;
    }

    public enum LikedStatus {
        /** 状态 已点赞、取消点赞*/
        LIKED,
        CANCELED,
        ;
    }
}