diff --git a/src/app/commons/model/Page.ts b/src/app/commons/model/Page.ts new file mode 100644 index 0000000..e64070a --- /dev/null +++ b/src/app/commons/model/Page.ts @@ -0,0 +1,13 @@ +export interface Page { + content: any; + first: boolean; + last: boolean; + number: number; + numberOfElements: number; + size: number; + sort: any; + totalElements: number; + totalPages: number; +} + +// export default Page; diff --git a/src/app/commons/model/PageParams.ts b/src/app/commons/model/PageParams.ts new file mode 100644 index 0000000..1ab0d14 --- /dev/null +++ b/src/app/commons/model/PageParams.ts @@ -0,0 +1,8 @@ +export interface PageParams { + pageNo: string; + countPerPage: string; + sortCol?: string; + sortDirection?: string; +} + +// export default PageParams; diff --git a/src/app/commons/model/index.ts b/src/app/commons/model/index.ts new file mode 100644 index 0000000..46f7171 --- /dev/null +++ b/src/app/commons/model/index.ts @@ -0,0 +1,2 @@ +export * from './Page'; +export * from './PageParams'; diff --git a/src/packages/infra/infra-store.module.ts b/src/packages/infra/infra-store.module.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/infra.constant.ts b/src/packages/infra/infra.constant.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/service/infra.service.spec.ts b/src/packages/infra/service/infra.service.spec.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/service/infra.service.ts b/src/packages/infra/service/infra.service.ts new file mode 100644 index 0000000..feddf80 --- /dev/null +++ b/src/packages/infra/service/infra.service.ts @@ -0,0 +1,32 @@ +// import { Injectable } from '@angular/core'; +// import { Observable } from 'rxjs/Observable'; + +// import 'rxjs/add/operator/map'; + +// import { RESTService } from 'packages/commons/service/rest.service'; +// import { DomainMember } from 'packages/domain/model'; + +// import { Infra } from '../model'; + +// @Injectable() +// export class MemberService { + +// public constructor( +// private restService: RESTService, +// ) { + +// } + +// public signin(email: string, password: string): Observable { +// const body = { +// signinId: email, +// signinPw: password, +// }; + +// return this.restService.post('/account/signin', body); +// } + +// public signup(member: Member): Observable { +// return this.restService.post('/account/signup', member); +// } +// } diff --git a/src/packages/infra/store/index.ts b/src/packages/infra/store/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/store/readbydomain/index.ts b/src/packages/infra/store/readbydomain/index.ts new file mode 100644 index 0000000..aee2667 --- /dev/null +++ b/src/packages/infra/store/readbydomain/index.ts @@ -0,0 +1,4 @@ +// export * from './readbydomain.action'; +// export * from './readbydomain.effect'; +// export * from './readbydomain.reducer'; +// export * from './readbydomain.state'; diff --git a/src/packages/infra/store/readbydomain/readbydomain.action.ts b/src/packages/infra/store/readbydomain/readbydomain.action.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/store/readbydomain/readbydomain.effect.spec.ts b/src/packages/infra/store/readbydomain/readbydomain.effect.spec.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/store/readbydomain/readbydomain.effect.ts b/src/packages/infra/store/readbydomain/readbydomain.effect.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/store/readbydomain/readbydomain.reducer.ts b/src/packages/infra/store/readbydomain/readbydomain.reducer.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/packages/infra/store/readbydomain/readbydomain.state.ts b/src/packages/infra/store/readbydomain/readbydomain.state.ts new file mode 100644 index 0000000..00c4c33 --- /dev/null +++ b/src/packages/infra/store/readbydomain/readbydomain.state.ts @@ -0,0 +1,20 @@ +import { ErrorResponse } from 'packages/commons/service/error-response'; + +import { Infra } from '../../model'; +import { Page } from '../../../../app/commons/model'; + +export interface State { + error: ErrorResponse | null; + isPending: boolean; + infraList: Infra[] | null; +} + +export const initialState: State = { + error: null, + isPending: false, + infraList: null, +}; + +export const getInfraList = (state: State) => state.infraList; +export const getError = (state: State) => state.error; +export const isPending = (state: State) => state.isPending;