package shop.alien.entity.storePlatform;

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 java.util.Date;

/**
 * 运营活动表
 *
 * @author system
 * @since 2025-11-26
 */
@Data
@JsonInclude
@TableName("store_operational_activity")
@ApiModel(value = "StoreOperationalActivity对象", description = "运营活动表")
public class StoreOperationalActivity {

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

    @ApiModelProperty(value = "商户ID")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "活动名称")
    @TableField("activity_name")
    private String activityName;

    @ApiModelProperty(value = "活动宣传图URL")
    @TableField("promotional_image")
    private String promotionalImage;

    @ApiModelProperty(value = "活动开始时间")
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "活动结束时间")
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "用户可参与次数，0表示不限制")
    @TableField("participation_limit")
    private Integer participationLimit;

    @ApiModelProperty(value = "活动规则：VERIFY_AND_COMMENT-核销并评论, VERIFY-核销, CHECK_IN-打卡")
    @TableField("activity_rule")
    private String activityRule;

    @ApiModelProperty(value = "奖励类型：COUPON-优惠券, RED_PACKET-红包, VOUCHER-代金券")
    @TableField("reward_type")
    private String rewardType;

    @ApiModelProperty(value = "优惠券ID，关联优惠券表 life_discount_coupon")
    @TableField("coupon_id")
    private Integer couponId;

    @ApiModelProperty(value = "代金券ID，关联代金券表 life_coupon（评论有礼时可二选一或同时配置）")
    @TableField("voucher_id")
    private Integer voucherId;

    @ApiModelProperty(value = "优惠券发放数量")
    @TableField("coupon_quantity")
    private Integer couponQuantity;

    @ApiModelProperty(value = "代金券发放数量")
    @TableField("voucher_quantity")
    private Integer voucherQuantity;

    @ApiModelProperty(value = "状态：0-草稿, 1-待审核, 2-未开始, 3-审核拒绝, 4-已售罄, 5-进行中, 6-已下架, 7-已结束, 8-审核成功(2+手动下架)")
    @TableField("status")
    private Integer status;

    @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")
    private Date createdTime;

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

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

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

    @ApiModelProperty(value = "拒绝原因")
    @TableField("approval_comments")
    private String approvalComments;

    @ApiModelProperty(value = "活动类型：COMMENT-评论有礼, MARKETING-营销活动")
    @TableField("activity_type")
    private String activityType;

    @ApiModelProperty(value = "报名开始时间")
    @TableField("signup_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date signupStartTime;

    @ApiModelProperty(value = "报名结束时间")
    @TableField("signup_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date signupEndTime;

    @ApiModelProperty(value = "活动限制人数")
    @TableField("activity_limit_people")
    private Integer activityLimitPeople;

    @ApiModelProperty(value = "活动详情")
    @TableField("activity_details")
    private String activityDetails;

    @ApiModelProperty(value = "结果类型：0-文字, 1-图片")
    @TableField("result_type")
    private Integer resultType;

    @ApiModelProperty(value = "结果文字")
    @TableField("result_text")
    private String resultText;

    @ApiModelProperty(value = "结果图片地址")
    @TableField("result_media_url")
    private String resultMediaUrl;

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

    @ApiModelProperty(value = "上传图片类型：0-本地上传, 1-AI生成")
    @TableField("upload_img_type")
    private Integer uploadImgType;

    @ApiModelProperty(value = "审核状态：0-待审核, 1-审核通过, 2-审核拒绝")
    @TableField("audit_status")
    private Integer auditStatus;
}

