临时提交
This commit is contained in:
16
Entity/AnchorModel.py
Normal file
16
Entity/AnchorModel.py
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# 主播模型
|
||||
class AnchorModel:
|
||||
def __init__(self, anchorId= "", country= ""):
|
||||
# 主播ID
|
||||
self.anchorId = anchorId
|
||||
# 主播国家
|
||||
self.country = country
|
||||
|
||||
# 字典转模型
|
||||
@classmethod
|
||||
def dictToModel(cls, d):
|
||||
model = AnchorModel()
|
||||
model.anchorId = d.get('anchorId', "")
|
||||
model.country = d.get('country', "")
|
||||
return model
|
||||
Reference in New Issue
Block a user