from peewee import * import uuid class BackupPlan(Model): id = UUIDField(primary_key=True, default=uuid.uuid4) label = CharField() source = CharField() class Meta: database = DatabaseProxy() class Destination(Model): source = ForeignKeyField(BackupPlan, backref='destinations') path = CharField()