如何在app引擎中设计徽章模型

时间:2014-03-22 05:30:02

标签: python google-app-engine google-cloud-datastore app-engine-ndb

我尝试使用ndb在谷歌应用引擎中制作徽章模型 我的设计是这样的:

class Badge(ndb.Model):
    icon = BlobKeyProperty()
    title = StringProperty()


class User(ndb.Model):
    ...
    badges = KeyProperty(Badge, repeated=True)

但是我有问题,但财产收入日来建模 例: 用户U1在2014年3月22日获得徽章B1

0 个答案:

没有答案
相关问题