Skip to content
NamPNQ edited this page Dec 18, 2013 · 2 revisions
class WeeklyQuiz(ndb.Model):
    description = ndb.StringProperty(indexed=False)
    start_date = ndb.DateTimeProperty()
    publish_date = ndb.DateTimeProperty(auto_now_add=True)
    limit_memory = ndb.IntegerProperty(default=100)
    limit_time = ndb.FloatProperty(default=60)
    test_case = ndb.StructuredProperty(WeeklyQuizTest, repeated=True)

    def get_top_player(self, limit):
        pass

    @classmethod
    def get_this_week_contest(cls):
        pass

###Mô tả Lưu trữ các bài đố vui hàng tuần

###Thuộc tính

  • description: Nội dung đố vui
  • start_date: Ngày cho phép đó vui xuất hiện trên trang chủ
  • publish_date: Ngày admin đăng đố vui
  • limit_memory: Giới hạn lưọng bộ nhớ được phép sử dụng
  • limit_time: Giới hạn thời gian biên dịch
  • test_case: Danh sách các test case để kiểm tra tính đúng đắn của đoạn code