package com.ruoyi.web.tool; import lombok.Data; /** * 分布式id模型 */ @Data public class IDModel { /** * 时针回拨变量(全域值) */ int hourHandVariable; /** * 最大时针回拨变量 */ int maxHourHandVariable; /** * 自增长变量 */ int selfGrowth; /** * 最大自增长变量 */ int maxSelfGrowth; /** * 返回的唯一id */ long id; public IDModel() { } public IDModel(int hourHandVariable, int maxHourHandVariable, int selfGrowth, int maxSelfGrowth) { this.hourHandVariable = hourHandVariable; this.maxHourHandVariable = maxHourHandVariable; this.selfGrowth = selfGrowth; this.maxSelfGrowth = maxSelfGrowth; } public IDModel setIDModel(int hourHandVariable, int maxHourHandVariable, int selfGrowth, int maxSelfGrowth, long id){ this.setHourHandVariable(hourHandVariable); this.setMaxHourHandVariable(maxHourHandVariable); this.setSelfGrowth(selfGrowth); this.setMaxSelfGrowth(maxSelfGrowth); this.setId(id); return this; } }