package com.yeshi.makemoney.app.entity.goldcorn;
|
|
import com.yeshi.makemoney.app.entity.SystemEnum;
|
import org.springframework.data.annotation.Id;
|
import org.springframework.data.mongodb.core.index.Indexed;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
import java.util.Date;
|
|
/**
|
* @author hxh
|
* @title: GoldCornGetFrequency
|
* @description: 金币获取频率设置
|
* @date 2022/3/31 18:41
|
*/
|
@Document(collection = "goldCornGetFrequencyConfig")
|
public class GoldCornGetFrequencyConfig {
|
|
public enum GoldCornGetFrequencyTimeUnit {
|
minute("分钟"), hour("小时"), day("天"), week("周"), month("月"), year("年");
|
|
private String name;
|
|
private GoldCornGetFrequencyTimeUnit(String name) {
|
this.name = name;
|
}
|
|
public String getName() {
|
return name;
|
}
|
}
|
|
@Id
|
private String id;
|
@Indexed
|
private SystemEnum system;
|
@Indexed
|
private GoldCornGetType type;
|
/**
|
* 限制的次数,配合单位使用,表示 每一个unit周期内limitCount次限制
|
*/
|
private Integer limitCount;
|
/**
|
* 单位
|
*/
|
private GoldCornGetFrequencyTimeUnit timeUnit;
|
|
|
/**
|
* 最小间隔时间(秒)
|
*/
|
private Long minSpaceTime;
|
|
@Indexed
|
private Date validateTime;
|
|
private String remarks;
|
|
private Date createTime;
|
private Date updateTime;
|
|
public String toId() {
|
return system.name() + "-" + type.name() + "-" + validateTime.getTime();
|
}
|
|
public String getId() {
|
return id;
|
}
|
|
public void setId(String id) {
|
this.id = id;
|
}
|
|
public SystemEnum getSystem() {
|
return system;
|
}
|
|
public void setSystem(SystemEnum system) {
|
this.system = system;
|
}
|
|
public GoldCornGetType getType() {
|
return type;
|
}
|
|
public void setType(GoldCornGetType type) {
|
this.type = type;
|
}
|
|
public Integer getLimitCount() {
|
return limitCount;
|
}
|
|
public void setLimitCount(Integer limitCount) {
|
this.limitCount = limitCount;
|
}
|
|
public GoldCornGetFrequencyTimeUnit getTimeUnit() {
|
return timeUnit;
|
}
|
|
public void setTimeUnit(GoldCornGetFrequencyTimeUnit timeUnit) {
|
this.timeUnit = timeUnit;
|
}
|
|
public Date getValidateTime() {
|
return validateTime;
|
}
|
|
public void setValidateTime(Date validateTime) {
|
this.validateTime = validateTime;
|
}
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public Date getUpdateTime() {
|
return updateTime;
|
}
|
|
public void setUpdateTime(Date updateTime) {
|
this.updateTime = updateTime;
|
}
|
|
public String getRemarks() {
|
return remarks;
|
}
|
|
public void setRemarks(String remarks) {
|
this.remarks = remarks;
|
}
|
|
|
public Long getMinSpaceTime() {
|
return minSpaceTime;
|
}
|
|
public void setMinSpaceTime(Long minSpaceTime) {
|
this.minSpaceTime = minSpaceTime;
|
}
|
}
|