package com.izouma.nineth.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class SysConfig extends AuditedEntity {
    @Id
    @Column(length = 25, unique = true)
    @ApiModelProperty(value = "名称", name = "name")
    private String name;

    @Column(name = "description")
    @ApiModelProperty(value = "描述", name = "desc")
    private String desc;

    @ApiModelProperty(value = "值", name = "value")
    private String value;

    @Enumerated(EnumType.STRING)
    private ValueType type;

    public enum ValueType {
        STRING,
        TIME,
        DATE,
        DATETIME,
        BOOLEAN,
        NUMBER
    }
}
