2011-01-24 23:18:56 +08:00
|
|
|
from django.db import models
|
2011-01-24 22:58:05 +08:00
|
|
|
|
2011-01-24 23:18:56 +08:00
|
|
|
|
|
|
|
class People(models.Model):
|
|
|
|
name = models.CharField(max_length=255)
|
|
|
|
|
|
|
|
class Message(models.Model):
|
|
|
|
from_field = models.ForeignKey(People, db_column='from_id')
|
2012-02-05 15:51:37 +08:00
|
|
|
|
|
|
|
class PeopleData(models.Model):
|
|
|
|
people_pk = models.ForeignKey(People, primary_key=True)
|
|
|
|
ssn = models.CharField(max_length=11)
|
|
|
|
|
|
|
|
class PeopleMoreData(models.Model):
|
|
|
|
people_unique = models.ForeignKey(People, unique=True)
|
|
|
|
license = models.CharField(max_length=255)
|
|
|
|
|