Skip to content

Add cadastral parcel price model #16

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
28 changes: 28 additions & 0 deletions src/namespaces/GeographicalReferences/CadastralParcelPrice.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Table } from "../../Database"
import type { Point } from "../../types/Geometry"

export interface ParcelPrice {
id: string
building_nature: string
building_area?: number
cadastral_parcel_id: string
cadastral_parcel_area?: number
cadastral_price: number
mutation_id: string
mutation_date: Date
centroid: Point
postal_code: string
department: string
}

export const ParcelPriceTable = Table<ParcelPrice>({
table: "registered_cadastral_prices",
primaryKey: "id",
oneToOne: {
cadastral_parcel_id: {
table: "registered_cadastral_parcels",
primaryKey: "id",
},
},
geometry: ["centroid"],
})