diff --git a/src/business/dto/createApplication.dto.ts b/src/business/dto/createApplication.dto.ts new file mode 100644 index 0000000..3f9253b --- /dev/null +++ b/src/business/dto/createApplication.dto.ts @@ -0,0 +1,61 @@ +import { IsBoolean, IsEnum, IsNumber, IsString } from "class-validator"; +import { BuisnessType } from "src/domain/enums/buisnessType.enum"; +import { ClubType } from "src/domain/enums/clubType.enum"; +import { Loc } from "src/domain/enums/loc.enum"; + +export class CreateApplicationDto { + + @IsEnum(BuisnessType) + businessType: BuisnessType; + + @IsString() + clubName: string; + + @IsBoolean() + isContiguous: boolean; + + @IsString() + contiguousLocation: string; + + @IsString() + businessName: string; + + @IsEnum(Loc) + businessLocation: Loc; + + @IsNumber() + totalBudget: number; + + @IsNumber() + subsidy: number + + @IsNumber() + selfInflicted: number; + + @IsEnum(ClubType) + clubType: ClubType; + + @IsNumber() + countOfManager: number; + + @IsNumber() + countOfMember: number; + + @IsString() + clubAddress: string; + + @IsNumber() + clubRegisterNumber: number; + + @IsBoolean() + isIncludingInfo: boolean; + + @IsBoolean() + isIncludingMemberList: boolean; + + @IsBoolean() + isIncludingPlan: boolean; + + @IsNumber() + year: number; +} \ No newline at end of file diff --git a/src/domain/entity/achievementStatus.entity.ts b/src/domain/entity/achievementStatus.entity.ts index 092639f..1b9c672 100644 --- a/src/domain/entity/achievementStatus.entity.ts +++ b/src/domain/entity/achievementStatus.entity.ts @@ -18,22 +18,30 @@ export class AchievementStatus { performanceResult: PerformanceResult; @Column({ - type: 'varchar' + type: 'enum', + enum: Amount, + default: Amount.nothing }) changedMember: Amount; @Column({ - type: 'varchar' + type: 'enum', + enum: Amount, + default: Amount.nothing }) increaseMain: Amount; @Column({ - type: 'varchar' + type: 'enum', + enum: Amount, + default: Amount.nothing }) increaseNew: Amount; @Column({ - type: 'varchar' + type: 'enum', + enum: Related, + default: Related.normal }) changedRelation: Related; } \ No newline at end of file diff --git a/src/domain/entity/budgetResult.entity.ts b/src/domain/entity/budgetResult.entity.ts index 8023f22..95ff412 100644 --- a/src/domain/entity/budgetResult.entity.ts +++ b/src/domain/entity/budgetResult.entity.ts @@ -28,7 +28,9 @@ export class BudgetResult { burden: number; @Column({ - type: 'varchar' + type: 'enum', + enum: Key, + default: Key.budgetSum }) key: Key; } \ No newline at end of file diff --git a/src/domain/entity/business.entity.ts b/src/domain/entity/business.entity.ts index 1ffe00e..3c0ada3 100644 --- a/src/domain/entity/business.entity.ts +++ b/src/domain/entity/business.entity.ts @@ -38,7 +38,9 @@ export class Business { businessPlan: BusinessPlan; @Column({ - type: 'varchar' + type: 'enum', + enum: BuisnessType, + default: BuisnessType.yuseongMagic }) businessType: BuisnessType; diff --git a/src/domain/entity/localResource.entity.ts b/src/domain/entity/localResource.entity.ts index 496096d..a0b4812 100644 --- a/src/domain/entity/localResource.entity.ts +++ b/src/domain/entity/localResource.entity.ts @@ -1,4 +1,5 @@ import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm"; +import { Type } from "../enums/type.enum"; import { BusinessPlan } from "./businessPlan.entity"; @Entity() @@ -18,10 +19,12 @@ export class LocalResource { businessPlan: BusinessPlan; @Column({ - type: 'varchar', + type: 'enum', + enum: Type, + default: Type.judge, nullable: true }) - type: string; + type: Type; @Column({ type: 'varchar' diff --git a/src/domain/entity/performanceDetail.entity.ts b/src/domain/entity/performanceDetail.entity.ts index 015362e..78686ab 100644 --- a/src/domain/entity/performanceDetail.entity.ts +++ b/src/domain/entity/performanceDetail.entity.ts @@ -48,7 +48,9 @@ export class PerformanceDetail { etc: number; @Column({ - type: 'varchar' + type: 'enum', + enum: Total, + default: Total.num }) total: Total; } \ No newline at end of file diff --git a/src/domain/entity/resident.entity.ts b/src/domain/entity/resident.entity.ts index 6a35cc5..e289346 100644 --- a/src/domain/entity/resident.entity.ts +++ b/src/domain/entity/resident.entity.ts @@ -23,7 +23,9 @@ export class Resident { name: string; @Column({ - type: 'varchar' + type: 'enum', + enum: Sex, + default: Sex.male }) sex: Sex; diff --git a/src/domain/enums/buisnessType.enum.ts b/src/domain/enums/buisnessType.enum.ts index 5a72427..f7cf6d4 100644 --- a/src/domain/enums/buisnessType.enum.ts +++ b/src/domain/enums/buisnessType.enum.ts @@ -1,3 +1,10 @@ export enum BuisnessType { - + yuseongMagic = '유성매직 네트워크', + recordImage = '기록 영상', + publicOpinion = '공론', + alleyEconomy = '골목경제', + careSystem = '돌봄체계 구축', + olderLeisure = '노년층 여가활동', + sharePlace = '공유공간 활성화', + livinglab = '리빙랩' } \ No newline at end of file diff --git a/src/domain/enums/clubType.enum.ts b/src/domain/enums/clubType.enum.ts index 01a4d11..6db7ac0 100644 --- a/src/domain/enums/clubType.enum.ts +++ b/src/domain/enums/clubType.enum.ts @@ -1,3 +1,5 @@ export enum ClubType { - + residentMeeting = '주민 모임', + npPrivateOrg = '비영리민간단체', + npCorporation = '비영리법인' } \ No newline at end of file