Skip to content

Commit

Permalink
Merge pull request #8 from andresWeitzel/feature-03-migrate-functions…
Browse files Browse the repository at this point in the history
…-to-files

feature-03-migrate-functions-to-files
  • Loading branch information
andresWeitzel authored Nov 11, 2023
2 parents 943aa57 + d126628 commit 74c0428
Show file tree
Hide file tree
Showing 17 changed files with 591 additions and 440 deletions.
27 changes: 27 additions & 0 deletions src/rate-plans/graphql/examples/createRatePlan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Create a rate plan
mutation {
createRatePlan(
ratePlanObj:{
name: "IOPA-278",
description: "plan for groupal annual subscriptions, until ten peoples",
versionId: 7822111,
versionPlan: "2.4",
status: "Published",
typePlan: "Annually - Groupal Subscribers",
subscriptionCharge: 1.1,
numberOfTiers: 3,
}
) {
id
name
description
versionId
versionPlan
status
typePlan
subscriptionCharge
numberOfTiers
creationDate
updateDate
}
}
16 changes: 16 additions & 0 deletions src/rate-plans/graphql/examples/getAllRatePlans.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Get All Rate Plans
query {
getAllRatePlans(pageNro: 0, pageSize: 100, orderBy: "name", orderAt: "asc") {
id
name
description
versionId
versionPlan
status
typePlan
subscriptionCharge
numberOfTiers
creationDate
updateDate
}
}
16 changes: 16 additions & 0 deletions src/rate-plans/graphql/examples/getByIdRatePlans.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# get by id Rate Plan
query {
getByIdRatePlans(inputId: 2) {
id
name
description
versionId
versionPlan
status
typePlan
subscriptionCharge
numberOfTiers
creationDate
updateDate
}
}
25 changes: 25 additions & 0 deletions src/rate-plans/graphql/examples/updateRatePlan.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Update a Rate Plan
mutation {
updateRatePlan(
id : 2,
ratePlanObj:{
name: "IOPA-27822",
description: "plan for groupal annual subscriptions, until ten peoples",
versionId: 7822111,
versionPlan: "2.4",
status: "Published",
typePlan: "Annually - Groupal Subscribers",
subscriptionCharge: 1.1,
numberOfTiers: 3,
}
) {
name
description
versionId
versionPlan
status
typePlan
subscriptionCharge
numberOfTiers
}
}
56 changes: 0 additions & 56 deletions src/rate-plans/graphql/mutations.txt

This file was deleted.

44 changes: 0 additions & 44 deletions src/rate-plans/graphql/queries.txt

This file was deleted.

29 changes: 24 additions & 5 deletions src/rate-plans/rate-plans.module.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
//External
import { Module } from '@nestjs/common';
//Service
import { RatePlansService } from './rate-plans.service';
//Resolvers
import { RatePlansResolver } from './rate-plans.resolver';
//Modules
import { DatabaseModule } from 'src/database/database.module';
//Providers
import { RatePlansProviders } from './rate-plans.providers';
import { CreateRatePlansService } from './services/create.service';
import { CreateRatePlansResolver } from './resolvers/create.resolver';
import { UpdateRatePlansService } from './services/update.service';
import { UpdateRatePlansResolver } from './resolvers/update.resolver';
import { GetAllRatePlansService } from './services/get-all.service';
import { GetAllRatePlansResolver } from './resolvers/get-all.resolver';
import { GetByIdRatePlansService } from './services/get-by-id.service';
import { GetByIdRatePlansResolver } from './resolvers/get-by-id.resolver';

@Module({
imports: [DatabaseModule],
providers: [...RatePlansProviders, RatePlansService, RatePlansResolver],
providers: [
//Providers
...RatePlansProviders,
//CreateRatePlan
CreateRatePlansService,
CreateRatePlansResolver,
//UpdateRatePlan
UpdateRatePlansService,
UpdateRatePlansResolver,
//GetAllRatePlan
GetAllRatePlansService,
GetAllRatePlansResolver,
//GetByIdRatePlan
GetByIdRatePlansService,
GetByIdRatePlansResolver,
],
})
export class RatePlansModule {}
139 changes: 0 additions & 139 deletions src/rate-plans/rate-plans.resolver.ts

This file was deleted.

Loading

0 comments on commit 74c0428

Please sign in to comment.