Guest User

Untitled

a guest
Feb 6th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. class User(models.Model):
  2. id = models.AutoField(db_column='id', primary_key=True)
  3. password = models.CharField(max_length=128)
  4. last_login = models.DateTimeField(blank=True, null=True)
  5. is_superuser = models.IntegerField()
  6.  
  7. class Order(models.Model):
  8. orderid = models.AutoField(db_column='orderId', primary_key=True)
  9. orderuserid = models.ForeignKey('User', models.DO_NOTHING,related_name='users', db_column='orderUserId')
  10. orderamount = models.IntegerField(db_column='orderAmount', blank=True, null=True)
Add Comment
Please, Sign In to add comment