/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.common.constant;

import lombok.Getter;

/**
 * 通用常量
 *
 * @author Chill
 */
public interface CommonConstant {

	/**
	 * sword 系统名
	 */
	String SWORD_NAME = "sword";

	/**
	 * saber 系统名
	 */
	String SABER_NAME = "saber";

	/**
	 * 顶级父节点id
	 */
	Integer TOP_PARENT_ID = 0;

	/**
	 * 顶级父节点名称
	 */
	String TOP_PARENT_NAME = "顶级";


	/**
	 * 默认密码
	 */
	String DEFAULT_PASSWORD = "123456";


	String ORGPOSITION_ROOT = "000000";




	/**
	 * 住户审核状态
	 */
	@Getter
	enum UserAuditStatus {
		unUpload(-1, "未上传"),
		wait(0, "待审核"),
		pass(1, "审核通过"),
		fail(2, "审核不通过");

		private int value;
		private String txt;

		UserAuditStatus(int value, String txt) {
			this.value = value;
			this.txt = txt;
		}
	}

	/**
	 * 会员审核状态
	 */
	@Getter
	enum MemberAuditStatus {
		unAuth(0, "未认证"),
		wait(1, "待认证"),
		authed(2, "已认证");

		private int value;
		private String txt;

		MemberAuditStatus(int value, String txt) {
			this.value = value;
			this.txt = txt;
		}
	}

	/**
	 * 人脸下发时用户的flag标签
	 */
	@Getter
	enum UserFlag {

		HOUSE_USER_FLAG("ZH_", "住户标记"),
		SERVER_USER_FLAG("FWY_", "服务员标记"),
		GUEST_FLAG("FK_", "访客标识"),
		ENTERPRISE_STAFF_FLAG("QYYG_", "企业员工标识"),
		ADMIN_FLAG("ADMIN_", "管理员标识");

		private String value;
		private String txt;

		UserFlag(String value, String txt) {
			this.value = value;
			this.txt = txt;
		}
	}

	@Getter
	enum UserType{

		HOUSE_USER("住户", 1),
		STAFF("企业员工",2),
		SERVER("服务人员",3),
		GUEST("访客",4),
		ADMIN("管理员",5);
		String name;
		Integer type;
		UserType(String name,Integer type){
			this.name = name;
			this.type = type;
		}

	}

	@Getter
	enum SystemConf {

		FILESERVER("file.server.host"),
		EXPIRE_NOTICE_DAYS("expire.notice.days");
		private String value;
		SystemConf(String value){
			this.value = value;
		}
	}


	@Getter
	enum TenantType {

		COMMUNITY("社区",0),
		PARK("园区",1);
		private Integer value;
		private String name;
		TenantType(String name,Integer value){
			this.name = name;
			this.value = value;
		}
	}

	@Getter
	enum PersonType {

		ENTERPRISESTAFF("员工",2),
		HOUSEUSER("住户",1);
		private Integer value;
		private String name;
		PersonType(String name,Integer value){
			this.name = name;
			this.value = value;
		}
	}

	@Getter
	enum THIRDPLATFORM {

		AEP("AEP平台","AEP"),
		PERCEPTION("感知平台","scepctwing");
		private String value;
		private String name;

		THIRDPLATFORM(String name,String value){
			this.name = name;
			this.value = value;
		}
	}

	@Getter
	enum AuthStatus {

		WAIT("待处理",1),
		SUCCESS("成功",2),
		FAIL("失败",3);
		private Integer value;
		private String name;
		AuthStatus(String name,Integer value){
			this.name = name;
			this.value = value;
		}
	}

	@Getter
	enum SmartDeviceType {

		DOOR_DEVICE("门禁设备",1),
		MONITOR_DEVICE("监控设备",2),
		PARKING_DEVICE("停车设备",3);
		private Integer value;
		private String name;
		SmartDeviceType(String name,Integer value){
			this.name = name;
			this.value = value;
		}
	}

	@Getter
	enum UserAccessPermissions {

		REMOTE_OPEN_DOOR("远程开门","1"),
		CARD_OPEN_DOOR("门禁卡开门","2"),
		FACE_OPEN_DOOR("人脸开门","3");
		private String name;
		private String value;
		UserAccessPermissions(String name,String value){
			this.name = name;
			this.value = value;
		}
	}

}
