mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-03-16 22:40:26 +00:00
21 lines
453 B
Python
21 lines
453 B
Python
from django.db import models
|
|
|
|
class Patient(models.Model):
|
|
class Meta:
|
|
app_label = 'eav'
|
|
|
|
name = models.CharField(max_length=12)
|
|
|
|
def __unicode__(self):
|
|
return self.name
|
|
|
|
class Encounter(models.Model):
|
|
class Meta:
|
|
app_label = 'eav'
|
|
|
|
num = models.PositiveSmallIntegerField()
|
|
patient = models.ForeignKey(Patient)
|
|
|
|
def __unicode__(self):
|
|
return '%s: encounter num %d' % (self.patient, self.num)
|
|
|