コード例 #1
0
class UserModel(models.Model):

    fields = [
        models.StringField(name="first_name", required=True),
        models.StringField(name="last_name", required=True),
        models.PkField(name="id", required=True)
    ]
コード例 #2
0
class UserModel(models.Model):
    fields = [
        models.StringField(name="first_name", required=True),
        models.StringField(name="last_name", required=True),
        models.PkField(name="id"),
        models.IntForeign(name="address",
                          foreign={
                              "table": "address",
                              "column": "id"
                          })
    ]
コード例 #3
0
class SQLModel(models.Model):
    fields = [
        models.IntegerField(name="age", required=True),
        models.StringField(name="name", required=True),
        models.PkField(name="id")
    ]
コード例 #4
0
 class OtherModel(models.Model):
     fields = [
         models.TimestampField(name="timestamp", required=True),
         models.PkField(name="id")
     ]
コード例 #5
0
ファイル: app.py プロジェクト: vivian-ruan/paper-test
class LunModel(models.Model):

    fields = [models.StringField(name="lun_name", required=True),
              models.StringField(name="size", required=True),
              models.PkField(name="lun_id", required=True)
              ]