package com.pig4cloud.pig.marketing.api.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * @author: lwh
 * @date: 2025-09-01
 * @description: 营销管理规则IP
 */
@Data
@TableName("mkt_mgmt_rule_ip")
@Schema(description = "营销管理规则")
@EqualsAndHashCode(callSuper = true)
public class MktMgmtRuleIp extends Model<MktMgmtRuleIp> {

	@Serial
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId(value = "id")
	@Schema(description = "id")
	private Long id;

	/**
	 * 规则id
	 */
	@Schema(description = "规则id")
	private Long ruleId;

	/**
	 * ip模式
	 */
	@Schema(description = "ip模式,1-单IP,2-IP段")
	private Integer ipMode;

	/**
	 * 起始IP地址
	 */
	@Schema(description = "起始IP地址")
	private String startIp;

	/**
	 * 结束IP地址
	 */
	@Schema(description = "结束IP地址")
	private String endIp;

	/**
	 * 删除标记
	 */
	@TableLogic
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "删除标记,1:已删除,0:正常")
	private String delFlag;

	/**
	 * 创建人
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;

	/**
	 * 修改人
	 */
	@TableField(fill = FieldFill.UPDATE)
	@Schema(description = "修改人")
	private String updateBy;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.UPDATE)
	@Schema(description = "更新时间")
	private LocalDateTime updateTime;
}
