class EventSchema(Schema): allow_extra_fields = True filter_extra_fields = True name = String(not_empty=True) date = SDate() location = String() sponsor = String() host = String() designer = String() chair = String() practice = Bool() ispro = Bool() courses = Int(min=1, not_empty=True) runs = Int(min=1, not_empty=True) countedruns = Int(if_empty=0) conepen = Number(if_empty=2.0) gatepen = Number(if_empty=10.0) segments = String() regopened = SDateTime() regclosed = SDateTime() perlimit = Int(min=1) doublespecial = Bool() totlimit = Int(min=0) paypal = String() cost = Int() notes = String()
class UserSchema(Schema): username = Regex(r'^[a-zA-Z0-9_@+\.-]+$', max=150) password = UnicodeString() first_name = UnicodeString(max=30) last_name = UnicodeString(max=150) email = Email() groups = ForEach(ResourceURI(model_cls=Group)) user_permissions = ForEach(ResourceURI(model_cls=Permission)) is_staff = Bool() is_active = Bool() is_superuser = Bool()
class ClassSchema(Schema): allow_extra_fields = True filter_extra_fields = True code = String(not_empty=True) descrip = String(not_empty=True) eventtrophy = Bool() champtrophy = Bool() carindexed = Bool() classindex = String() classmultiplier = Number(not_empty=True) usecarflag = Bool() numorder = Int() countedruns = Int(if_empty=0) caridxrestrict = String()
class SettingsSchema(Schema): allow_extra_fields = True filter_extra_fields = False seriesname = String(not_empty=True) largestcarnumber = Int(min=99) minevents = Int(if_empty=0) useevents = Int(not_empty=True) sponsorlink = String() pospointlist = String() champsorting = String() superuniquenumbers = Bool() indexafterpenalties = Bool() locked = Bool() usepospoints = Bool() sponsorimage = Validator() seriesimage = Validator() cardimage = Validator()
class LockssomaticSpaceSchema(TypeOfSpaceSchema): collection_iri = UnicodeString(max=256) content_provider_id = UnicodeString(max=32) checksum_type = UnicodeString(max=64) keep_local = Bool() au_size = Int() sd_iri = URL(max=256) external_domain = URL()
class LocationSchema(Schema): description = UnicodeString(max=256) purpose = OneOf(_flatten(models.Location.PURPOSE_CHOICES)) relative_path = UnicodeString() quota = Int(min=0) enabled = Bool() space = ResourceURI(model_cls=models.Space) pipeline = ForEach(ResourceURI(model_cls=models.Pipeline)) replicators = ForEach(ResourceURI(model_cls=models.Location))
class CopySeriesSchema(Schema): allow_extra_fields = True filter_extra_fields = True name = Regex(r'^(\w)+$') password = String(not_empty=True) settings = Bool() data = Bool() classes = Bool() drivers = Bool() cars = Bool() prevlist = Bool()
class TestRunSchema(ReportSchema): """Test Run Report Schema""" btype = String(if_missing=None, if_empty=None) platform = String(if_missing=None, if_empty=None) category = String(if_missing=None, if_empty=None) group = Bool(if_missing=None)
class PipelineSchema(Schema): api_key = UnicodeString(max=256) api_username = UnicodeString(max=256) description = UnicodeString(max=256) enabled = Bool() remote_name = Any(validators=[IPAddress(), URL()])
class PipelineLocalSpaceSchema(TypeOfSpaceSchema): remote_user = UnicodeString(max=64) remote_name = UnicodeString(max=256) assume_rsync_daemon = Bool() rsync_password = UnicodeString(max=64)
class NFSSpaceSchema(TypeOfSpaceSchema): remote_name = UnicodeString(max=256) remote_path = UnicodeString() version = UnicodeString(max=64) manually_mounted = Bool()