Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated pp field names(MAPCO-4684) #197

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/models/polygonParts/polygonPartRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ interface IPropPYCSWMapping extends IPYCSWMapping {

@graphqlClass({ alias: 'PolygonPartRecord' })
export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
//#region METADATA: id
//#region METADATA: sourceId
@catalogDB({
column: {
name: 'id',
name: 'source_id',
type: 'text',
nullable: true,
},
Expand All @@ -35,12 +35,12 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
category: FieldCategory.MAIN,
})
//#endregion
public id: string | undefined = undefined;
public sourceId: string | undefined = undefined;

//#region METADATA: name
//#region METADATA: sourceName
@catalogDB({
column: {
name: 'name',
name: 'source_name',
type: 'text',
nullable: true,
},
Expand All @@ -57,7 +57,7 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
category: FieldCategory.MAIN,
})
//#endregion
public name: string | undefined = undefined;
public sourceName: string | undefined = undefined;

//#region METADATA: productId
@catalogDB({
Expand Down Expand Up @@ -450,11 +450,11 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
//#endregion
public geometry: GeoJSON | undefined = undefined;

//#region RECORD: internalId
//#region RECORD: id
@catalogDB({
column: {
name: 'internal_id',
type: 'number',
name: 'id',
type: 'text',
nullable: false,
primary: true,
},
Expand All @@ -469,7 +469,7 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
})
//#endregion
// eslint-disable-next-line @typescript-eslint/naming-convention
public internalId: number | undefined;
public id: string | undefined;

//#region RECORD: partId
@catalogDB({
Expand All @@ -490,10 +490,10 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
//#endregion
public partId: number | undefined;

//#region RECORD: recordId
//#region RECORD: catalogId
@catalogDB({
column: {
name: 'record_id',
name: 'catalog_id',
type: 'text',
nullable: false,
},
Expand All @@ -507,12 +507,12 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
isAutoGenerated: true,
})
//#endregion
public recordId: string | undefined = 'UNKNOWN';
public catalogId: string | undefined = 'UNKNOWN';

//#region RECORD: updatedInVersion [Version number of the best layer when it was updated]
//#region RECORD: productVersion [Version number of the best layer when it was updated]
@catalogDB({
column: {
name: 'updated_in_version',
name: 'product_version',
type: 'text',
nullable: true,
},
Expand All @@ -536,7 +536,7 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
],
})
//#endregion
public updatedInVersion: string | undefined = undefined;
public productVersion: string | undefined = undefined;

//#region RECORD: ingestionDateUTC
@catalogDB({
Expand Down Expand Up @@ -615,8 +615,8 @@ export class PolygonPartRecord implements IPolygonPart, IOrmCatalog {
}

export interface IPolygonPart {
id: string | undefined;
name: string | undefined;
sourceId: string | undefined;
sourceName: string | undefined;
description: string | undefined;
resolutionDegree: number | undefined;
resolutionMeter: number | undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/models/raster/ingestion/ingestionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class NewRasterLayerMetadata extends BaseRasterLayerMetadata implements I

export type PolygonPart = Pick<
PolygonPartRecord,
| 'name'
| 'sourceName'
| 'resolutionDegree'
| 'resolutionMeter'
| 'sourceResolutionMeter'
Expand All @@ -74,7 +74,7 @@ export type PolygonPart = Pick<
| 'imagingTimeEndUTC'
| 'geometry'
> &
Partial<Pick<PolygonPartRecord, 'id' | 'description' | 'countries' | 'cities'>>;
Partial<Pick<PolygonPartRecord, 'sourceId' | 'description' | 'countries' | 'cities'>>;

export interface InputFiles {
originDirectory: string;
Expand Down
6 changes: 3 additions & 3 deletions src/yaml/ingestionTrigger/partData/rasterLayerPartData.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ components:
type: object
description: Layer polygon part data definitions
required:
- name
- sourceName
- imagingTimeBeginUTC
- imagingTimeEndUTC
- geometry
Expand All @@ -18,10 +18,10 @@ components:
- horizontalAccuracyCE90
- sensors
properties:
id:
sourceId:
type: string
description: Layer's external identifier
name:
sourceName:
type: string
description: Layer's external name
imagingTimeBeginUTC:
Expand Down
Loading