Add basic switch model and migrate fronter command

This commit is contained in:
Ske
2018-10-11 12:54:40 +02:00
parent 31322f3fea
commit 4a48e43d13
4 changed files with 49 additions and 16 deletions

11
src/pluralkit/switch.py Normal file
View File

@@ -0,0 +1,11 @@
from collections import namedtuple
from typing import List
from pluralkit import db
from pluralkit.member import Member
class Switch(namedtuple("Switch", ["id", "system", "timestamp", "members"])):
async def fetch_members(self, conn) -> List[Member]:
return await db.get_members(conn, self.members)