package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 装修需求动态表
 * <p>
 * 注意：装修需求的图片和视频附件直接存储在本表的 attachment_urls 字段中
 * 存储格式：多个URL用逗号拼接，例如："url1,url2,url3"
 * 最多支持9个附件（图片或视频）
 * </p>
 *
 * @author auto-generated
 * @since 2025-01-15
 */
@Data
@JsonInclude
@TableName("store_renovation_requirement")
@ApiModel(value = "StoreRenovationRequirement对象", description = "装修需求动态表")
public class StoreRenovationRequirement {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "门店ID（发布装修需求的普通公司门店）")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "需求标题")
    @TableField("requirement_title")
    private String requirementTitle;

    @ApiModelProperty(value = "装修类型（1:新房装修, 2:旧房改造, 3:局部装修）")
    @TableField("renovation_type")
    private Integer renovationType;

    @ApiModelProperty(value = "房屋面积（平方米）")
    @TableField("house_area")
    private BigDecimal houseArea;

    @ApiModelProperty(value = "装修预算（万元）")
    @TableField("renovation_budget")
    private BigDecimal renovationBudget;

    @ApiModelProperty(value = "详细需求描述")
    @TableField("detailed_requirement")
    private String detailedRequirement;

    @ApiModelProperty(value = "房屋图纸附件（图片和视频URL，多个URL用逗号拼接，最多9个）")
    @TableField("attachment_urls")
    private String attachmentUrls;

    @ApiModelProperty(value = "期望装修时间")
    @TableField("expected_renovation_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date expectedRenovationTime;

    @ApiModelProperty(value = "联系人姓名")
    @TableField("contact_name")
    private String contactName;

    @ApiModelProperty(value = "联系电话")
    @TableField("contact_phone")
    private String contactPhone;

    @ApiModelProperty(value = "所在城市")
    @TableField("city")
    private String city;

    @ApiModelProperty(value = "城市编码（adcode）")
    @TableField("city_adcode")
    private String cityAdcode;

    @ApiModelProperty(value = "详细地址")
    @TableField("detailed_address")
    private String detailedAddress;

    @ApiModelProperty(value = "服务协议确认（0:未确认, 1:已确认）")
    @TableField("agreement_confirmed")
    private Integer agreementConfirmed;

    @ApiModelProperty(value = "动态状态（0:草稿, 1:已发布, 2:已下架）")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "浏览数")
    @TableField("view_count")
    private Integer viewCount;

    @ApiModelProperty(value = "咨询数（装修商家查看并联系的数量）")
    @TableField("inquiry_count")
    private Integer inquiryCount;

    @ApiModelProperty(value = "审核状态（0:待审核, 1:审核通过, 2:审核失败）")
    @TableField("audit_status")
    private Integer auditStatus;

    @ApiModelProperty(value = "审核失败原因")
    @TableField("audit_reason")
    private String auditReason;

    @ApiModelProperty(value = "审核时间")
    @TableField("audit_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    @ApiModelProperty(value = "审核人ID")
    @TableField("audit_user_id")
    private Integer auditUserId;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;
}

