package domain

/*****   1.用户模块  *****/
// 用户类型
const (
	UserTypeEmployee       = 1
	UserTypeCooperation    = 2
	UserTypeVisitor        = 4
	UserTypeOperationAdmin = 8
	UserTypeCompanyAdmin   = 1024
)

// 用户状态
const (
	UserStatusEnable  int = 1
	UserStatusDisable int = 2
	UserStatusDestroy int = 3
)

/*****   2.菜单模块  *****/
// 菜单启用状态 结合用户菜单权限
const (
	MenuStatusEnable  = 1 // 菜单启用
	MenuStatusDisable = 2 // 菜单禁用
)

// 菜单公开状态
const (
	MenuPublic  = 1 // 菜单公开
	MenuPrivate = 2 // 菜单未公开
)

const (
	WebMenuCode = "web"
	AppMenuCode = "app"
)

/*****   3.组织模块  *****/
const (
	IsOrgFlag    = 1 //   标记为组织
	IsNotOrgFlag = 2 // 标记为非组织
)

const (
	OrgStatusEnable  = 1
	OrgStatusDisable = 2
)

const (
	MaxQueryRowCount    = 1000
	NormalQueryRowCount = 100
)

const (
	// 导入公司用户
	ImportCompanyUser = "ADMIN_SYSTEM-MANAGE_BASE_USER"
	// 导入公司组织
	ImportOrganization = "ADMIN_SYSTEM-MANAGE_BASE_DEPARTMENT"
	// 导入共创用户
	ImportCooperationUser = "ADMIN_SYSTEM-MANAGE_BASE_ALLIED-USER"

	// 导入分红订单
	ImportDividendsOrders = "BUSINESS_ALLIED-CREATION_BONUS_ORDER"
	// 导入退货订单
	ImportDividendsReturnOrders = "BUSINESS_ALLIED-CREATION_BONUS_RETURN"

	// 导入产品
	ImportProducts = "BUSINESS_ALLIED-MANUFACTURING_BASIC_PRODUCT"
	// 导入设备
	ImportDevices = "BUSINESS_ALLIED-MANUFACTURING_BASIC_DEVICE"
)

const (
	// 导入公司用户
	ExportCompanyUser = "ExportCompanyUser"
	// 导入共创用户
	ExportCooperationUser = "ExportCooperationUser"

	// 导入产品
	ExportProducts = "ExportProducts"
	// 导出员工产能统计
	ExportManufactureEmployeeProductive = "ExportManufactureEmployeeProductive"
	// 导出车间产能统计
	ExportManufactureWorkshopProductive = "ExportManufactureWorkshopProductive"

	// 员工工时
	ExportManufactureEmployeeAttendanceStatics = "ExportManufactureEmployeeAttendanceStatics"
	// 车间工时
	ExportManufactureWorkshopAttendanceStatics = "ExportManufactureWorkshopAttendanceStatics"
)

const (
	CooperationUserDepartmentName = "共创用户"
)

const (
	BlockChainSourceCooperationContract          = "allied-creation.cooperation.contract"
	BlockChainSourceCooperationProject           = "allied-creation.cooperation.project"
	BlockChainSourceCooperationDividendsEstimate = "allied-creation.cooperation.dividends-estimate"
)

const (
	DefaultPassword = "4a693460c4cf078ea5b6b5a9e2cf382064a6f810" // TL123456!
)

func EmployeeTypeDescription(employeeType int) string {
	if employeeType == 1 {
		return "固定"
	}
	if employeeType == 2 {
		return "派遣"
	}
	if employeeType == 3 {
		return "临时"
	}
	return "固定"
}

func ParticipateTypeDescription(participateType int) string {
	if participateType == 1 {
		return "正常"
	}
	if participateType == 2 {
		return "支援"
	}
	return "正常"
}