class SQLModel(models.Model):
    fields = [
        models.IntegerField(name="age", required=True),
        models.StringField(name="name", required=True),
        models.PkField(name="id")
    ]
class RateLimitModel(models.Model):
    fields = [
        models.StringPkField(name="id"),
        models.IntegerField(name="quota"),
        models.TimestampField(name="last_request")
    ]
예제 #3
0
 class BadModel(models.Model):
     fields = [
         models.IntegerField(name="age", required=True),
         models.StringField(name="name", required=True),
     ]