import { useEnumStore } from '@/stores'

const { getEnumTypeList, getEnumTypeName } = useEnumStore()

/**
 * 签约状态
 */
export enum SignStatus {
    Unsigned = 1,  // 未签约
    Audit = 2,  // 签约待审核
    Signing = 3,  // 签约中
    Signed = 4,  // 已签约
    Rescinded = 7,  // 已解约
    Refuse = 10, // 审核拒绝
}

/**
 * 获取签约状态列表
 * @returns 
 */
export function getSignStatusList() {
    return getEnumTypeList('signstatus')
}

/**
 * 获取签约状态名称
 * @returns 
 */
export function getSignStatusName(value: number) {
    const enums = getSignStatusList()
    return getEnumTypeName(enums, value)
}

/**
 * 获取资金流水操作类型列表
 * @returns 
 */
export function getAccountBusinessCodeList() {
    return getEnumTypeList('accountBusinessCode')
}

/**
 * 获取资金流水操作类型名称
 * @returns 
 */
export function getAccountBusinessCodeName(value: number) {
    const enums = getAccountBusinessCodeList()
    return getEnumTypeName(enums, value)
}