mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
34 lines
866 B
Python
34 lines
866 B
Python
from typing import *
|
|
from sqlalchemy import *
|
|
from sqlalchemy.orm import relationship
|
|
from sqlalchemy.ext.declarative import declared_attr
|
|
from .keipeople import KeiPerson
|
|
|
|
if TYPE_CHECKING:
|
|
from royalnet.backpack.tables import User
|
|
|
|
|
|
class KeiUnlocks:
|
|
__tablename__ = "keiunlocks"
|
|
|
|
@declared_attr
|
|
def unlocks_id(self) -> int:
|
|
return Column(Integer, primary_key=True)
|
|
|
|
@declared_attr
|
|
def eris_id(self) -> str:
|
|
return Column(String, ForeignKey("keipeople.kpid"))
|
|
|
|
@declared_attr
|
|
def eris(self) -> "KeiPerson":
|
|
return relationship("KeiPerson", foreign_keys=self.eris_id)
|
|
|
|
@declared_attr
|
|
def rygryg_id(self) -> str:
|
|
return Column(String, ForeignKey("keipeople.kpid"))
|
|
|
|
@declared_attr
|
|
def rygryg(self) -> "KeiPerson":
|
|
return relationship("KeiPerson", foreign_keys=self.rygryg_id)
|
|
|
|
|