export const useTenantMgmtStore = defineStore('tenantMgmtStore', () => { const tenantInfo = ref({ tenantName: '', // 테넌트 이름 tenantCode: '', // 테넌트 고유번호 corpNum: '', // 사업자 등록 번호 customerType: '', // 고객 유형 tenantAddress: '', // 테넌트 주소 tenantLocLatitude: '', // 위도 tenantLocLongitude: '', // 경도 description: '', // 설명 imsiPrefix: '', // imsiPrefix regionalCode: '', // 지역코드 }) const licenseInfo = ref({ licenseKey: '', // 라이선스 키 licenseType: '', // 라이선스 유형 issueDate: '', // 발급일 expirationDate: '', // 만료일 maxAccount: '', // 최대 계정 수 maxSession: '', // 최대 세션 수 clientAccess: '', // 클라이언트 접속 허용 여부 maxSubscriber: '', // 최대 가입자 수 }) const getTenantInfo = computed(() => tenantInfo.value) const getLicenseInfo = computed(() => licenseInfo.value) function setTenantInfo(payload){ tenantInfo.value.tenantName = payload.tenantName tenantInfo.value.tenantCode = payload.tenantCode tenantInfo.value.corpNum = payload.corpNum tenantInfo.value.customerType = payload.customerType tenantInfo.value.tenantAddress = payload.tenantAddress tenantInfo.value.tenantLocLatitude = payload.tenantLocLatitude tenantInfo.value.tenantLocLongitude = payload.tenantLocLongitude tenantInfo.value.description = payload.description tenantInfo.value.imsiPrefix = payload.imsiPrefix tenantInfo.value.regionalCode = payload.regionalCode } function setLicenseInfo(payload){ licenseInfo.value.licenseKey = payload.licenseKey licenseInfo.value.licenseType = payload.licenseType licenseInfo.value.issueDate = payload.issueDate licenseInfo.value.expirationDate = payload.expirationDate licenseInfo.value.maxAccount = payload.maxAccount licenseInfo.value.maxSession = payload.maxSession licenseInfo.value.clientAccess = payload.clientAccess licenseInfo.value.maxSubscriber = payload.maxSubscriber } return { tenantInfo, getTenantInfo, setTenantInfo, licenseInfo, getLicenseInfo, setLicenseInfo} }, {persist: { storage: persistedState.sessionStorage,}})