ConsultancyProject1_Auslast.../docs/schema.dbml

44 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-03-15 15:16:42 +01:00
// Use DBML to define your database structure
// Docs: https://dbml.dbdiagram.io/docs
Table seeds [note: 'Table contains the URIs which are used for the initial scraping.'] {
seed_id integer [primary key]
uri text [not null, unique]
region_id integer [not null, ref: > regions.region_id]
}
Table regions {
region_id integer [primary key]
name varchar(255) [not null]
}
Table properties {
property_id integer [primary key]
property_platform_id varchar(255) [unique, not null, note: 'uuid from platform beeing used']
seed_id integer [not null, ref: > seeds.seed_id]
check_data json [note: 'for storing data, which is beeing used for consistency checks. E. g. geo_dates or title']
last_found timestamp
created_at timestamp
}
2024-04-13 00:34:40 +02:00
Table extractions {
extraction_id integer [primary key]
2024-03-15 15:16:42 +01:00
property_id integer [unique, ref: > properties.property_id]
2024-04-13 00:34:40 +02:00
body text [not null]
2024-03-15 15:16:42 +01:00
header text [not null]
created_at timestamp [not null]
}
2024-04-13 00:34:40 +02:00
enum types {
2024-03-15 15:16:42 +01:00
property
2024-04-13 00:34:40 +02:00
calendar
offer
2024-03-15 15:16:42 +01:00
}
Table exceptions {
2024-04-13 00:34:40 +02:00
exception_id integer [primary key]
2024-03-15 15:16:42 +01:00
exception json [not null, note: "exception while scraping (e. g. HTTP error message) and called url."]
2024-04-13 00:34:40 +02:00
type types [not null, note: "for which entity did the exception occur."]
property_id integer [not null, ref: > properties.property_id, note: "either a property_id"]
2024-03-15 15:16:42 +01:00
}