package com.example.demo.model;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

@Entity
@Table(name = "system_settings")
public class SystemSettings {

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

    /** 标准版价格（单位：元） */
    @NotNull
    @Min(0)
    @Column(nullable = false)
    private Integer standardPriceCny = 0;

    /** 专业版价格（单位：元） */
    @NotNull
    @Min(0)
    @Column(nullable = false)
    private Integer proPriceCny = 0;

    /** 每次生成消耗的资源点数量 */
    @NotNull
    @Min(0)
    @Column(nullable = false)
    private Integer pointsPerGeneration = 1;

    /** 站点名称 */
    @Column(nullable = false, length = 100)
    private String siteName = "AIGC Demo";

    /** 站点副标题 */
    @Column(nullable = false, length = 150)
    private String siteSubtitle = "现代化的Spring Boot应用演示";

    /** 是否开放注册 */
    @NotNull
    @Column(nullable = false)
    private Boolean registrationOpen = true;

    /** 维护模式开关 */
    @NotNull
    @Column(nullable = false)
    private Boolean maintenanceMode = false;

    /** 支付渠道开关 */
    @NotNull
    @Column(nullable = false)
    private Boolean enableAlipay = true;

    @NotNull
    @Column(nullable = false)
    private Boolean enablePaypal = true;

    /** 联系邮箱 */
    @Column(length = 120)
    private String contactEmail = "support@example.com";

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getStandardPriceCny() {
        return standardPriceCny;
    }

    public void setStandardPriceCny(Integer standardPriceCny) {
        this.standardPriceCny = standardPriceCny;
    }

    public Integer getProPriceCny() {
        return proPriceCny;
    }

    public void setProPriceCny(Integer proPriceCny) {
        this.proPriceCny = proPriceCny;
    }

    public Integer getPointsPerGeneration() {
        return pointsPerGeneration;
    }

    public void setPointsPerGeneration(Integer pointsPerGeneration) {
        this.pointsPerGeneration = pointsPerGeneration;
    }

    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    public String getSiteSubtitle() {
        return siteSubtitle;
    }

    public void setSiteSubtitle(String siteSubtitle) {
        this.siteSubtitle = siteSubtitle;
    }

    public Boolean getRegistrationOpen() {
        return registrationOpen;
    }

    public void setRegistrationOpen(Boolean registrationOpen) {
        this.registrationOpen = registrationOpen;
    }

    public Boolean getMaintenanceMode() {
        return maintenanceMode;
    }

    public void setMaintenanceMode(Boolean maintenanceMode) {
        this.maintenanceMode = maintenanceMode;
    }

    public Boolean getEnableAlipay() {
        return enableAlipay;
    }

    public void setEnableAlipay(Boolean enableAlipay) {
        this.enableAlipay = enableAlipay;
    }

    public Boolean getEnablePaypal() {
        return enablePaypal;
    }

    public void setEnablePaypal(Boolean enablePaypal) {
        this.enablePaypal = enablePaypal;
    }

    public String getContactEmail() {
        return contactEmail;
    }

    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }
}


