about summary refs log tree commit diff
path: root/dropcalc/mxl_types/set.py
blob: 498cdcf5a938645d43e8a67d4971e672d0e5b0f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from sqlalchemy import ForeignKey
from sqlalchemy.orm import Mapped, mapped_column

from . import BaseDAO


class SetItem(BaseDAO):
	filename = "SetItems.txt"
	__tablename__ = "set_item"

	id: Mapped[int] = mapped_column(primary_key=True)
	index: Mapped[str]   # string reference, often also human-readable
	item = mapped_column(ForeignKey("base.code"))  # note inconsistency with everything else...
	rarity: Mapped[int]  # drop frequency, relative to other sets on this base
	lvl: Mapped[int]     # minimum drop level