package com.backendsys.modules.crt.entity;

import com.backendsys.entity.validator.RangeArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@TableName("crt_lora_style_collect")
public class CrtLoraStyleCollect {

    public static interface Collect{}

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long user_id;

    @NotNull(message = "lora_style_id 不能为空", groups = { Collect.class })
    private Long lora_style_id;

    @TableField(exist = false)
    @NotNull(message = "收藏状态不能为空", groups = { Collect.class })
    @RangeArray(message="收藏状态取值有误，范围应是(-1取消收藏, 1加入收藏)", value = {"-1", "1"}, groups = { Collect.class })
    private Integer is_collect;
    private String create_time;
}
