tenantMgmt.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. export const useTenantMgmtStore = defineStore('tenantMgmtStore', () => {
  2. const tenantInfo = ref({
  3. tenantName: '', // 테넌트 이름
  4. tenantCode: '', // 테넌트 고유번호
  5. corpNum: '', // 사업자 등록 번호
  6. customerType: '', // 고객 유형
  7. tenantAddress: '', // 테넌트 주소
  8. tenantLocLatitude: '', // 위도
  9. tenantLocLongitude: '', // 경도
  10. description: '', // 설명
  11. imsiPrefix: '', // imsiPrefix
  12. regionalCode: '', // 지역코드
  13. })
  14. const licenseInfo = ref({
  15. licenseKey: '', // 라이선스 키
  16. licenseType: '', // 라이선스 유형
  17. issueDate: '', // 발급일
  18. expirationDate: '', // 만료일
  19. maxAccount: '', // 최대 계정 수
  20. maxSession: '', // 최대 세션 수
  21. clientAccess: '', // 클라이언트 접속 허용 여부
  22. maxSubscriber: '', // 최대 가입자 수
  23. })
  24. const getTenantInfo = computed(() => tenantInfo.value)
  25. const getLicenseInfo = computed(() => licenseInfo.value)
  26. function setTenantInfo(payload){
  27. tenantInfo.value.tenantName = payload.tenantName
  28. tenantInfo.value.tenantCode = payload.tenantCode
  29. tenantInfo.value.corpNum = payload.corpNum
  30. tenantInfo.value.customerType = payload.customerType
  31. tenantInfo.value.tenantAddress = payload.tenantAddress
  32. tenantInfo.value.tenantLocLatitude = payload.tenantLocLatitude
  33. tenantInfo.value.tenantLocLongitude = payload.tenantLocLongitude
  34. tenantInfo.value.description = payload.description
  35. tenantInfo.value.imsiPrefix = payload.imsiPrefix
  36. tenantInfo.value.regionalCode = payload.regionalCode
  37. }
  38. function setLicenseInfo(payload){
  39. licenseInfo.value.licenseKey = payload.licenseKey
  40. licenseInfo.value.licenseType = payload.licenseType
  41. licenseInfo.value.issueDate = payload.issueDate
  42. licenseInfo.value.expirationDate = payload.expirationDate
  43. licenseInfo.value.maxAccount = payload.maxAccount
  44. licenseInfo.value.maxSession = payload.maxSession
  45. licenseInfo.value.clientAccess = payload.clientAccess
  46. licenseInfo.value.maxSubscriber = payload.maxSubscriber
  47. }
  48. return { tenantInfo, getTenantInfo, setTenantInfo, licenseInfo, getLicenseInfo, setLicenseInfo}
  49. }, {persist: { storage: persistedState.sessionStorage,}})