package com.zhongshu.card.server.core.domain.projectAbout;

import com.zhongshu.card.client.type.PassWordDefaultType;
import com.zhongshu.card.client.type.PassWordType;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import com.zhongshu.card.server.core.domain.org.Organization;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 项目相关的 通用设置
 *
 * @author TRX
 * @date 2024/9/24
 */
@Data
@Builder
@Document
@AllArgsConstructor
@NoArgsConstructor
public class ProjectCommonConfig extends SuperMain {

    @Schema(description = "项目信息")
    @DBRef(lazy = true)
    private Organization projectInfo;

    @Schema(description = "项目名称")
    private String projectName;

    @Schema(description = "项目编码")
    private String projectCode;

    //----------------------------业务信息 start-----------------

    @Schema(description = "最小密码长度")
    private Integer minPassWordLength = 6;

    @Schema(description = "最小密码长度")
    private Integer maxPassWordLength = 20;

    @Schema(description = "密码字符组合类型")
    private PassWordType passWordType;

    @Schema(description = "默认密码设置类型")
    private PassWordDefaultType passWordDefaultType;

    @Schema(description = "这样的默认密码")
    private String defaultPassWord;

    @Schema(description = "默认用户头像")
    private String defaultUserHead;

    // --------------游客许可 ---------------
    @Schema(description = "允许游客注册")
    private Boolean isAllowRegister = Boolean.FALSE;

    @Schema(description = "允许游客消费")
    private Boolean isAllowConsume = Boolean.FALSE;

    @Schema(description = "用户协议")
    private String userAgreement = "";

    @Schema(description = "隐私政策")
    private String privacyPolicy = "";
}
