Files
Pf2eDataScrapper/dbml/schema.dbml
T

349 lines
8.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// https://dbml.dbdiagram.io/docs
// Entity
Table entity {
id int [pk]
name varchar [not null, note: "{*}.name"]
img varchar(100) [note: "{*}.img"]
type entity_type [not null]
slug varchar
rarity entity_rarity [not null, default: "common", note: "{*}.system.rarity"]
}
Enum entity_type {
feat
}
Enum entity_rarity {
common
uncommon
rare
}
// Alias
Table entity_aliases {
id int [pk, increment]
entity_id int [ref: > entity.id]
alias varchar [not null]
type alias_type [not null]
}
Enum alias_type {
old
english
hobby
}
// Keywords
Table keyword {
id int [pk, increment]
}
Table entity_keywords {
entity_id int [ref: > entity.id]
keyword_id int [ref: > keyword.id]
}
// Sources
TableGroup source_group {
source
entity_sources
}
Table source {
id int [pk, increment]
name varchar
url varchar
}
Table entity_sources {
entity_id int [ref: > entity.id]
source_id int [ref: > source.id]
suffix varchar [default: ""]
}
// External links
TableGroup external_group {
external_target
entity_external
}
Table external_target {
id int
name varchar
icon varchar
}
Table entity_external {
entity_id int [ref: > entity.id]
target_id int [ref: > external_target.id]
path varchar
}
// Traits
TableGroup trait_group {
trait
entity_traits
}
Table trait {
id int [pk]
name varchar [not null]
description text
}
Table entity_traits {
entity_id int [ref: > entity.id]
trait_id int [ref: > trait.id]
}
// ----------------------------------------------
// Action
Table action {
id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
type action_type [not null, note: "{}.system.actionType.value"]
actions int [null, note: "{}.system.actions?.value"]
category action_category [null, note: "{}.system.category"] // Нет у 81 объекта
death_note bool [null, note: "{}.system.deathNote"]
Note: '''{} = Item.action
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
{}.system.frequency -> ??? Возможно нужно на общую frequency
Рассмотреть:
{}.system.selfEffect
{}.system.duration
{}.system.start - .value всегда 103462347
{}.system.target
Не использованы поля:
{}.system.subfeatures - пишем в описании пока что, потом подключение таблицы
{}.system.actionCategory - всегда пробел???
'''
}
Enum action_type {
action
free
reaction
passive
}
Enum action_category {
offensive
defensive
interaction
familiar
}
// Ancestery
Table ancestry {
id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
hp int [not null, note: "{}.system.hp"]
reach int [not null, note: "{}.system.reach"]
size ancestry_size [not null, note: "{}.system.size"]
speed int [not null, note: "{}.system.speed"]
vision ancestry_vision [not null, note: "{}.system.vision"]
Note: '''{} = Item.ancestry
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
{}.system.boosts
{}.system.flaws
{}.system.items - TODO добавить в определение dict-типа
{}.system.lanuages
Не использованы поля:
{}.system.additionalLanguages
'''
}
Enum ancestry_size {
med
lanuages
system
tiny
}
Enum ancestry_vision {
normal
low-light-vision
darkvision
}
// Armor
Table armor {
id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
ac_bonus int [not null, note: "{}.system.acBonus"]
strength int [null, note: "{}.system.strength"]
check_penalty int [not null, note: "{}.system.checkPenalty"]
dex_cap int [not null, note: "{}.system.dexCap"]
speed_penalty int [not null, note: "{}.system.speedPenalty"]
bulk float [not null, note: "{}.system.bulk"]
category armor_category [not null, note: "{}.system.category"]
group armor_group [null, note: "{}.system.group"] // 16 без группы
level int [not null, note: "{}.system.level.value"]
price int [not null, note: "price({}.system.price.value)"]
size armor_size [not null, note: "{}.system.size"]
Note: '''{} = Item.armor
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
{}.system.base_item - возможно связь на себя
{}.system.material
{}.system.runes
{}.system.specific
Не использованы поля:
{}.system.containerId - пустое
{}.system.hardness - всегда 0
{}.system.hp - всегда 0
{}.system.quantity - всегда 1
'''
}
Enum armor_category {
light
heavy
medium
light-barding
heavy-barding
unarmored
}
Enum armor_group {
leather
plate
wood
chain
cloth
skeletal
composite
}
Enum armor_size {
med
lg
}
// Background
Table background {
id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
Note: '''{} = Item.background
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
{}.system.boosts
Не использованы поля:
'''
}
// Feat
Table feat {
id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
action_type feat_action_type [note: "{}.system.actionType.value"]
actions int [null, note: "{}.system.actions?.value"]
category feat_category [not null, note: "{}.system.category"]
level int [not null, note: "{}.system.level.value"]
level_taker int [null, note: "{}.system.level.taken"] // Всего 2 значения: 1, 2
max_takable int [null, note: "{}.system.level.maxTakable"]
location varchar(12) [null, note: "{}.system.level.location"]
only_level_1 bool [null, note: "{}.system.onlyLevel1"]
Note: '''{} = Item.feat
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
{}.system.frequency -> feat_frequency
Рассмотреть:
{}.system.prerequisites
{}.system.selfEffect
{}.system.duration
{}.system.start - .value всегда 103462347
{}.system.target
Не использованы поля:
{}.system.subfeatures - пишем в описании пока что, потом подключение таблицы
{}.system.actionCategory - всегда пробел???
'''
}
Enum feat_action_type {
passive
action
reaction
free
}
Enum feat_category {
ancestryfeature
classfeature
calling
class
skill
general
ancestry
bonus
deityboon
curse
pfsboon
}
Table feat_frequency {
feat_id int [pk, ref: > feat.id]
max int [not null, note: "{Item.feat}.system.frequency.max"]
per int [not null, note: "{Item.feat}.system.frequency.per"]
value int [null, note "{Item.feat}.system.frequency.value - что это вообще?!"]
}
/*
Table template {
id int [pk, ref: - entity.id]
description text [not null, note: "{}.system.description"]
Note: '''{} = Item.
Перенаправление:
{}.system.publication -> entity_sources
{}.system.traits -> entity_traits
Рассмотреть:
Не использованы поля:
'''
}
*/