You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
406 B

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