class Child(core.Model): id = core.SlugAttribute() name = core.StringAttribute() parents = core.ManyToManyAttribute(Parent, related_name='children') class Meta(core.Model.Meta): attribute_order = ('id', 'name', 'parents')
class Reaction(core.Model): model = core.ManyToOneAttribute(Model, related_name='reactions') id = core.SlugAttribute() metabolites = core.ManyToManyAttribute(Metabolite, related_name='reactions') enzyme = core.ManyToOneAttribute(Protein, related_name='reactions') class Meta(core.Model.Meta): attribute_order = ('model', 'id', 'metabolites', 'enzyme')
class Parent(core.Model): id = core.SlugAttribute(verbose_name='Id') name = core.StringAttribute(verbose_name='Name') children = core.ManyToManyAttribute(Child, related_name='parents', verbose_name='Children') class Meta(core.Model.Meta): attribute_order = ('id', 'name', 'children') verbose_name = 'Parent' verbose_name_plural = 'Parent'
class Gen3(core.Model): id = core.SlugAttribute() parents = core.ManyToManyAttribute(Gen2, related_name='children')
class Child(core.Model): id = core.SlugAttribute() parents = core.ManyToManyAttribute(Parent, related_name='children')
class NormNodeLevel2(core.Model): label = core.StringAttribute(primary=True, unique=True) parents = core.ManyToManyAttribute(NormNodeLevel1, related_name='children')
class Level001(core.Model): id = core.SlugAttribute() parents = core.ManyToManyAttribute('Level00', related_name='children_001')