package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 编码规则对象 sys_code_rule
 * 
 * @author Yangk
 * @date 2026-06-08
 */
public class SysCodeRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 规则ID */
    private Long ruleId;

    /** 规则编码 */
    @Excel(name = "规则编码")
    private String ruleCode;

    /** 规则名称 */
    @Excel(name = "规则名称")
    private String ruleName;

    /** 编码前缀 */
    @Excel(name = "编码前缀")
    private String codePrefix;

    /** 日期格式 */
    @Excel(name = "日期格式")
    private String dateFormat;

    /** 流水号长度 */
    @Excel(name = "流水号长度")
    private Long serialLength;

    /** 当前流水号 */
    @Excel(name = "当前流水号", type = Excel.Type.EXPORT)
    private Long currentSerial;

    /** 重置周期：DAY、MONTH、YEAR、NONE */
    @Excel(name = "重置周期", dictType = "ams_code_reset_cycle", comboReadDict = true)
    private String resetCycle;

    /** 上次流水键，例如20260526 */
    @Excel(name = "上次流水键", type = Excel.Type.EXPORT)
    private String lastSerialKey;

    /** 启用状态：Y启用，N停用 */
    @Excel(name = "启用状态", dictType = "ams_enabled_status", comboReadDict = true)
    private String enabled;

    /** 删除标志：0存在，1删除 */
    private String delFlag;

    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }

    public void setRuleCode(String ruleCode) 
    {
        this.ruleCode = ruleCode;
    }

    public String getRuleCode() 
    {
        return ruleCode;
    }

    public void setRuleName(String ruleName) 
    {
        this.ruleName = ruleName;
    }

    public String getRuleName() 
    {
        return ruleName;
    }

    public void setCodePrefix(String codePrefix) 
    {
        this.codePrefix = codePrefix;
    }

    public String getCodePrefix() 
    {
        return codePrefix;
    }

    public void setDateFormat(String dateFormat) 
    {
        this.dateFormat = dateFormat;
    }

    public String getDateFormat() 
    {
        return dateFormat;
    }

    public void setSerialLength(Long serialLength) 
    {
        this.serialLength = serialLength;
    }

    public Long getSerialLength() 
    {
        return serialLength;
    }

    public void setCurrentSerial(Long currentSerial) 
    {
        this.currentSerial = currentSerial;
    }

    public Long getCurrentSerial() 
    {
        return currentSerial;
    }

    public void setResetCycle(String resetCycle) 
    {
        this.resetCycle = resetCycle;
    }

    public String getResetCycle() 
    {
        return resetCycle;
    }

    public void setLastSerialKey(String lastSerialKey) 
    {
        this.lastSerialKey = lastSerialKey;
    }

    public String getLastSerialKey() 
    {
        return lastSerialKey;
    }

    public void setEnabled(String enabled) 
    {
        this.enabled = enabled;
    }

    public String getEnabled() 
    {
        return enabled;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ruleId", getRuleId())
            .append("ruleCode", getRuleCode())
            .append("ruleName", getRuleName())
            .append("codePrefix", getCodePrefix())
            .append("dateFormat", getDateFormat())
            .append("serialLength", getSerialLength())
            .append("currentSerial", getCurrentSerial())
            .append("resetCycle", getResetCycle())
            .append("lastSerialKey", getLastSerialKey())
            .append("enabled", getEnabled())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
