Exemplo n.º 1
0
class subscriber(Model):
    package_id = Model.Uuid(null=False, callback=package)
    username = Model.Username(placeholder="john", max_length=100, null=False)
    password = Model.Password(max_length=100, null=True, ignore_null=True)
    email = Model.Email(placeholder="*****@*****.**", max_length=255)
    name = Model.String(placeholder="John Doe", max_length=100)
    phone_mobile = Model.Phone(placeholder="+1-202-555-0103")
    phone_office = Model.Phone(placeholder="+1-202-555-0105")
    designation = Model.Enum('', 'Mr', 'Mrs', 'Ms', 'Dr', 'Prof')
    enabled = Model.Boolean(default=True)
    package_expire = Model.DateTime(null=True)
    volume_expire = Model.DateTime(null=True)
    creation_time = Model.DateTime(default=now, readonly=True)
Exemplo n.º 2
0
class tradius_subscriber(Model):
    id = Model.Uuid(default=uuid4, internal=True)
    virtual_id = Model.Uuid(readonly=True,
                            null=False,
                            data_endpoint='radius',
                            data_url='/v1/virtual')
    domain = Model.Fqdn(internal=True)
    tenant_id = Model.Uuid(internal=True)
    username = Model.Username(placeholder="john", max_length=100, null=False)
    password = Model.Password(max_length=100, null=True, ignore_null=True)
    email = Model.Email(placeholder="*****@*****.**", max_length=255)
    name = Model.String(placeholder="John Doe", max_length=100)
    phone_mobile = Model.Phone(placeholder="+1-202-555-0103")
    phone_office = Model.Phone(placeholder="+1-202-555-0105")
    designation = Model.Enum('', 'Mr', 'Mrs', 'Ms', 'Dr', 'Prof')
    dpi = Model.String(max_length=20, placeholder='Shaped1', label='DPI Class')
    enabled = Model.Boolean(default=True)
    creation_time = Model.DateTime(default=now, readonly=True)
    primary_key = id
Exemplo n.º 3
0
class luxon_user(Model):
    id = Model.Uuid(default=uuid4, internal=True)
    tag = Model.String(hidden=True, max_length=30, null=False)
    domain = Model.Fqdn(internal=True)
    tenant_id = Model.Uuid(internal=True)
    username = Model.Username(max_length=100, null=False)
    password = Model.String(max_length=100,
                            null=True,
                            ignore_null=True,
                            password=True)
    confirm_password = Model.Confirm(password)
    email = Model.Email(max_length=255)
    name = Model.String(max_length=100)
    phone_mobile = Model.Phone()
    phone_office = Model.Phone()
    designation = Model.Enum('', 'Mr', 'Mrs', 'Ms', 'Dr', 'Prof')
    last_login = Model.DateTime(readonly=True)
    enabled = Model.Boolean(default=True)
    creation_time = Model.DateTime(default=now, readonly=True)
    primary_key = id