package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 活动主表
 * </p>
 *
 * @author ssk
 * @since 2025-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="StoreActivity对象", description="活动主表")
public class StoreActivity extends Model<StoreActivity> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "活动编号")
    @TableField("active_no")
    private String activityNo;

    @ApiModelProperty(value = "活动标题")
    @TableField("activity_title")
    private String activityTitle;

    @ApiModelProperty(value = "活动类型(1:邀请好友 2:签到领红包)")
    @TableField("activity_type")
    private Integer activityType;

    @ApiModelProperty(value = "活动图片(JSON数组)")
    @TableField("contract_image")
    private String contractImage;

    @ApiModelProperty(value = "活动人群类型(0:全部用户 1:自定义)")
    @TableField("activity_crowd_type")
    private Integer activityCrowdType;

    @ApiModelProperty(value = "指定用户ID列表(JSON数组)")
    @TableField("user_ids")
    private String userIds;

    @ApiModelProperty(value = "具体规则说明")
    @TableField("specific_rules")
    private String specificRules;

    @ApiModelProperty(value = "活动开始时间")
    @TableField("activity_start_time")
    private Date activityStartTime;

    @ApiModelProperty(value = "活动结束时间")
    @TableField("activity_end_time")
    private Date activityEndTime;

    @ApiModelProperty(value = "是否永久有效")
    @TableField("is_permanent")
    private Boolean isPermanent;

    @ApiModelProperty(value = "状态(0:待审核 1:审核通过 2:审核拒绝)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "审批意见")
    @TableField("approval_opinion")
    private String approvalOpinion;

    @ApiModelProperty(value = "删除状态")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Integer createdUserId;

    @ApiModelProperty(value = "修改人ID")
    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updatedUserId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
