From 4abdaec91a5fb04214a55894c1df3ab4b2c633fe Mon Sep 17 00:00:00 2001 From: byung eun park Date: Sun, 27 Oct 2019 19:14:06 +0900 Subject: [PATCH] info model --- .../component/bank-info-list.component.ts | 2 +- .../component/bank-info-list.data-source.ts | 4 ++-- src/modules/moneys/infos.module.ts | 24 +++++++++++++++++++ src/modules/moneys/model/bank.model.ts | 11 +++++++++ src/modules/moneys/model/deposit.model.ts | 11 +++++++++ src/modules/moneys/model/pay-done.model.ts | 9 +++++++ src/modules/moneys/model/pay.model.ts | 10 ++++++++ src/modules/moneys/model/withdraw.model.ts | 9 +++++++ src/modules/moneys/service/index.ts | 1 + src/modules/moneys/type/bank-state.type.ts | 4 ++++ src/modules/moneys/type/banking-state.type.ts | 7 ++++++ .../{bank-info => }/model/bank-info.model.ts | 0 .../service/bank-info.service.ts | 0 .../sites/{bank-info => }/service/index.ts | 2 +- src/modules/sites/sites.module.ts | 4 ++-- src/modules/user/model/user.model.ts | 6 +++++ 16 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 src/modules/moneys/infos.module.ts create mode 100644 src/modules/moneys/model/bank.model.ts create mode 100644 src/modules/moneys/model/deposit.model.ts create mode 100644 src/modules/moneys/model/pay-done.model.ts create mode 100644 src/modules/moneys/model/pay.model.ts create mode 100644 src/modules/moneys/model/withdraw.model.ts create mode 100644 src/modules/moneys/service/index.ts create mode 100644 src/modules/moneys/type/bank-state.type.ts create mode 100644 src/modules/moneys/type/banking-state.type.ts rename src/modules/sites/{bank-info => }/model/bank-info.model.ts (100%) rename src/modules/sites/{bank-info => }/service/bank-info.service.ts (100%) rename src/modules/sites/{bank-info => }/service/index.ts (51%) diff --git a/src/app/pages/sites/site/component/bank-info-list.component.ts b/src/app/pages/sites/site/component/bank-info-list.component.ts index e767325..18b7b6f 100644 --- a/src/app/pages/sites/site/component/bank-info-list.component.ts +++ b/src/app/pages/sites/site/component/bank-info-list.component.ts @@ -11,7 +11,7 @@ import { import { Subject } from 'rxjs'; import { fuseAnimations } from 'src/@fuse/animations'; import { BankInfoListDataSource } from './bank-info-list.data-source'; -import { BankInfoService } from 'src/modules/sites/bank-info/service/bank-info.service'; +import { BankInfoService } from 'src/modules/sites/service/bank-info.service'; import { FormGroup, FormBuilder, diff --git a/src/app/pages/sites/site/component/bank-info-list.data-source.ts b/src/app/pages/sites/site/component/bank-info-list.data-source.ts index 4cedb6f..56e3e2f 100644 --- a/src/app/pages/sites/site/component/bank-info-list.data-source.ts +++ b/src/app/pages/sites/site/component/bank-info-list.data-source.ts @@ -5,8 +5,8 @@ import { map } from 'rxjs/operators'; import { CollectionViewer } from '@angular/cdk/collections'; -import { BankInfo } from 'src/modules/sites/bank-info/model/bank-info.model'; -import { BankInfoService } from 'src/modules/sites/bank-info/service/bank-info.service'; +import { BankInfo } from 'src/modules/sites/model/bank-info.model'; +import { BankInfoService } from 'src/modules/sites/service/bank-info.service'; import { FormControl, FormGroup, Validators, FormArray } from '@angular/forms'; diff --git a/src/modules/moneys/infos.module.ts b/src/modules/moneys/infos.module.ts new file mode 100644 index 0000000..ca03262 --- /dev/null +++ b/src/modules/moneys/infos.module.ts @@ -0,0 +1,24 @@ +import { NgModule, ModuleWithProviders } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { SERVICES } from './service/index'; + +@NgModule({ + imports: [], + exports: [] +}) +export class MoneysRootModule {} + +@NgModule({ + declarations: [], + imports: [CommonModule], + exports: [] +}) +export class MoneysModule { + public static forRoot(): ModuleWithProviders { + return { + ngModule: MoneysRootModule, + providers: [SERVICES] + }; + } +} diff --git a/src/modules/moneys/model/bank.model.ts b/src/modules/moneys/model/bank.model.ts new file mode 100644 index 0000000..a1b5265 --- /dev/null +++ b/src/modules/moneys/model/bank.model.ts @@ -0,0 +1,11 @@ +import { UserDateAuditEntity } from 'src/modules/common/data/model/audit'; +import { BankStateName } from '../type/bank-state.type'; + +export interface Bank extends UserDateAuditEntity { + id?: number; + password?: string; + name?: string; + accountNumber?: string; + holder?: string; + status?: BankStateName; +} diff --git a/src/modules/moneys/model/deposit.model.ts b/src/modules/moneys/model/deposit.model.ts new file mode 100644 index 0000000..484a413 --- /dev/null +++ b/src/modules/moneys/model/deposit.model.ts @@ -0,0 +1,11 @@ +import { UserDateAuditEntity } from 'src/modules/common/data/model/audit'; +import { BankingStateName } from '../type/banking-state.type'; + +export interface Deposit extends UserDateAuditEntity { + id?: number; + price?: number; + bonus?: number; + bank?: number; + bankAccounts?: number; + status?: BankingStateName; +} diff --git a/src/modules/moneys/model/pay-done.model.ts b/src/modules/moneys/model/pay-done.model.ts new file mode 100644 index 0000000..ee6afb7 --- /dev/null +++ b/src/modules/moneys/model/pay-done.model.ts @@ -0,0 +1,9 @@ +import { UserDateAuditEntity } from 'src/modules/common/data/model/audit'; + +export interface PayDone extends UserDateAuditEntity { + id?: number; + settleUser?: number; + price?: number; + startDate?: Date; + endDate?: Date; +} diff --git a/src/modules/moneys/model/pay.model.ts b/src/modules/moneys/model/pay.model.ts new file mode 100644 index 0000000..3fd8ff4 --- /dev/null +++ b/src/modules/moneys/model/pay.model.ts @@ -0,0 +1,10 @@ +import { UserDateAuditEntity } from 'src/modules/common/data/model/audit'; +import { BankingStateName } from '../type/banking-state.type'; + +export interface Pay extends UserDateAuditEntity { + id?: number; + belongUser?: number; + bankingUser?: number; + price?: number; + status?: BankingStateName; +} diff --git a/src/modules/moneys/model/withdraw.model.ts b/src/modules/moneys/model/withdraw.model.ts new file mode 100644 index 0000000..fd71e1e --- /dev/null +++ b/src/modules/moneys/model/withdraw.model.ts @@ -0,0 +1,9 @@ +import { UserDateAuditEntity } from 'src/modules/common/data/model/audit'; +import { BankingStateName } from '../type/banking-state.type'; + +export interface Withdraw extends UserDateAuditEntity { + id?: number; + price?: number; + bank?: number; + status?: BankingStateName; +} diff --git a/src/modules/moneys/service/index.ts b/src/modules/moneys/service/index.ts new file mode 100644 index 0000000..95757e2 --- /dev/null +++ b/src/modules/moneys/service/index.ts @@ -0,0 +1 @@ +export const SERVICES = []; diff --git a/src/modules/moneys/type/bank-state.type.ts b/src/modules/moneys/type/bank-state.type.ts new file mode 100644 index 0000000..564aff8 --- /dev/null +++ b/src/modules/moneys/type/bank-state.type.ts @@ -0,0 +1,4 @@ +export enum BankStateName { + CONFIRM = 'CONFIRM', + NOT_CONFIRM = 'NOT_CONFIRM' +} diff --git a/src/modules/moneys/type/banking-state.type.ts b/src/modules/moneys/type/banking-state.type.ts new file mode 100644 index 0000000..e5285af --- /dev/null +++ b/src/modules/moneys/type/banking-state.type.ts @@ -0,0 +1,7 @@ +export enum BankingStateName { + WAITING = 'WAITING', + HOLD = 'HOLD', + COMPLETE = 'COMPLETE', + DEPOSIT = 'DEPOSIT', + WITHDRAW = 'WITHDRAW' +} diff --git a/src/modules/sites/bank-info/model/bank-info.model.ts b/src/modules/sites/model/bank-info.model.ts similarity index 100% rename from src/modules/sites/bank-info/model/bank-info.model.ts rename to src/modules/sites/model/bank-info.model.ts diff --git a/src/modules/sites/bank-info/service/bank-info.service.ts b/src/modules/sites/service/bank-info.service.ts similarity index 100% rename from src/modules/sites/bank-info/service/bank-info.service.ts rename to src/modules/sites/service/bank-info.service.ts diff --git a/src/modules/sites/bank-info/service/index.ts b/src/modules/sites/service/index.ts similarity index 51% rename from src/modules/sites/bank-info/service/index.ts rename to src/modules/sites/service/index.ts index 52c2b11..962016d 100644 --- a/src/modules/sites/bank-info/service/index.ts +++ b/src/modules/sites/service/index.ts @@ -1,3 +1,3 @@ import { BankInfoService } from './bank-info.service'; -export const BANK_INFO_SERVICES = [BankInfoService]; +export const SERVICES = [BankInfoService]; diff --git a/src/modules/sites/sites.module.ts b/src/modules/sites/sites.module.ts index 1c4e865..4965ffb 100644 --- a/src/modules/sites/sites.module.ts +++ b/src/modules/sites/sites.module.ts @@ -1,6 +1,6 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { BANK_INFO_SERVICES } from './bank-info/service'; +import { SERVICES } from './service'; @NgModule({ imports: [], @@ -17,7 +17,7 @@ export class SitesModule { public static forRoot(): ModuleWithProviders { return { ngModule: SitesRootModule, - providers: [BANK_INFO_SERVICES] + providers: [SERVICES] }; } } diff --git a/src/modules/user/model/user.model.ts b/src/modules/user/model/user.model.ts index 2b82d26..47bb4c7 100644 --- a/src/modules/user/model/user.model.ts +++ b/src/modules/user/model/user.model.ts @@ -1,6 +1,12 @@ import { Role } from './role.model'; import { DateAudit } from 'src/modules/common/data/model/audit'; +export enum StatusName { + USER_BLOCK = 'USER_BLOCK', + USER_NORMAL = 'USER_NORMAL', + USER_WITHDRAW = 'USER_WITHDRAW' +} + export interface User extends DateAudit { id?: number; username?: string;