MCPcopy Create free account
hub / github.com/Loping151/RoverSign / RoverSignData

Class RoverSignData

RoverSign/utils/database/models.py:257–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255 return False
256
257
258class RoverSignData(PydanticBaseModel):
259 uid: str # 鸣潮UID
260 pgr_uid: Optional[str] = None # 战双UID
261 date: Optional[str] = None # 签到日期
262 game_sign: Optional[int] = None # 游戏签到(鸣潮)
263 pgr_game_sign: Optional[int] = None # 游戏签到(战双)
264 bbs_sign: Optional[int] = None # 社区签到
265 bbs_detail: Optional[int] = None # 社区浏览
266 bbs_like: Optional[int] = None # 社区点赞
267 bbs_share: Optional[int] = None # 社区分享
268
269 @classmethod
270 def build(cls, uid: str, pgr_uid: Optional[str] = None):
271 date = get_today_date()
272 return cls(uid=uid, pgr_uid=pgr_uid, date=date)
273
274 @classmethod
275 def build_game_sign(cls, uid: str):
276 return cls(uid=uid, game_sign=1)
277
278 @classmethod
279 def build_pgr_game_sign(cls, uid: str):
280 return cls(uid=uid, pgr_game_sign=1)
281
282 @classmethod
283 def build_bbs_sign(
284 cls,
285 uid: str,
286 ):
287 return cls(
288 uid=uid,
289 bbs_sign=0,
290 bbs_detail=0,
291 bbs_like=0,
292 bbs_share=0,
293 )
294
295

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected