From 24071878bf03692504f6306b08fde98b5e4fcdc4 Mon Sep 17 00:00:00 2001 From: atrincas Date: Wed, 27 Nov 2024 11:11:37 +0100 Subject: [PATCH] Moved CARBON_REVENUES_TO_COVER enum to entity file --- shared/entities/carbon-revenues-to-cover.enum.ts | 4 ---- shared/entities/custom-project.entity.ts | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 shared/entities/carbon-revenues-to-cover.enum.ts diff --git a/shared/entities/carbon-revenues-to-cover.enum.ts b/shared/entities/carbon-revenues-to-cover.enum.ts deleted file mode 100644 index b78d87e1..00000000 --- a/shared/entities/carbon-revenues-to-cover.enum.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum CARBON_REVENUES_TO_COVER { - OPEX = "Opex", - CAPEX_AND_OPEX = "Capex and Opex", -} diff --git a/shared/entities/custom-project.entity.ts b/shared/entities/custom-project.entity.ts index 2a28d7bc..94833c9a 100644 --- a/shared/entities/custom-project.entity.ts +++ b/shared/entities/custom-project.entity.ts @@ -17,6 +17,11 @@ import { Country } from "@shared/entities/country.entity"; * The shape defined here is probably wrong, it's only based on the output of the prototype in the notebooks, and it will only serve as a learning resource. */ +export enum CARBON_REVENUES_TO_COVER { + OPEX = "Opex", + CAPEX_AND_OPEX = "Capex and Opex", +} + @Entity({ name: "custom_projects" }) export class CustomProject { @PrimaryGeneratedColumn("uuid") @@ -39,7 +44,7 @@ export class CustomProject { output_snapshot: any; static fromCustomProjectSnapshotDTO( - dto: CustomProjectSnapshotDto + dto: CustomProjectSnapshotDto, ): CustomProject { const customProject = new CustomProject(); customProject.countryCode = {