forked from brain-ag/trabalhe-conosco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from LucasPereiraMiranda/develop
Develop
- Loading branch information
Showing
15 changed files
with
387 additions
and
4 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class Migration1736369286911 implements MigrationInterface { | ||
name = 'Migration1736369286911' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "harvest" DROP CONSTRAINT "FK_246d631160ff530434f0380a0ec"`); | ||
await queryRunner.query(`ALTER TABLE "harvest" RENAME COLUMN "harvest_id" TO "agricultural_property_id"`); | ||
await queryRunner.query(`ALTER TABLE "harvest" ADD CONSTRAINT "FK_95308fdd7e5d65bce65a6d9fc2d" FOREIGN KEY ("agricultural_property_id") REFERENCES "agricultural_property"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "harvest" DROP CONSTRAINT "FK_95308fdd7e5d65bce65a6d9fc2d"`); | ||
await queryRunner.query(`ALTER TABLE "harvest" RENAME COLUMN "agricultural_property_id" TO "harvest_id"`); | ||
await queryRunner.query(`ALTER TABLE "harvest" ADD CONSTRAINT "FK_246d631160ff530434f0380a0ec" FOREIGN KEY ("harvest_id") REFERENCES "agricultural_property"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/modules/agricutural-property/dto/response/dashboardLandUse.response.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class DashboardLandUseResponseDto { | ||
@ApiProperty({ | ||
type: Number, | ||
description: 'Soma da área de vegetação de todas as propriedades rurais', | ||
example: 150, | ||
}) | ||
sumVegetationArea: number; | ||
|
||
@ApiProperty({ | ||
type: Number, | ||
description: 'Soma da área agricultável de todas as propriedades rurais', | ||
example: 180, | ||
}) | ||
sumArableArea: number; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/modules/agricutural-property/dto/response/dashboardPropertiesByCrop.response.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
|
||
export class DashboardPropertiesByCropItemResponseDto { | ||
@ApiProperty({ | ||
type: Number, | ||
description: 'Soma da área total em hectares associado a cultura', | ||
example: 1050, | ||
}) | ||
sumTotalArea: number; | ||
|
||
@ApiProperty({ | ||
type: String, | ||
description: 'Nome da cultura', | ||
example: 'Milho', | ||
}) | ||
cropName: string; | ||
} |
Oops, something went wrong.