package kr.co.accura.wbx.spring.config;

import jakarta.persistence.*;
import lombok.*;

import java.time.LocalDateTime;

@Entity
@Table(name = "wbx_system_config")
@Getter @Setter
@NoArgsConstructor @AllArgsConstructor @Builder
public class WbxSystemConfig {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "config_key", nullable = false, unique = true, length = 100)
    private String configKey;

    @Column(name = "config_value", length = 4000)
    private String configValue;

    @Column(name = "value_type", length = 20)
    @Builder.Default
    private String valueType = "STRING"; // STRING, INT, BOOLEAN, JSON

    @Column(length = 500)
    private String description;

    @Builder.Default
    @Column(name = "is_editable")
    private boolean isEditable = true;

    private LocalDateTime updatedAt;
    private Long updatedBy;
}
