user:
    label: User
    table: user
    fields:
        username:
            type: text
            label: Username
            required: true
        password:
            type: text
            label: Password Hash
            description: 'Set this to your desired password. Will be automatically converted to an hash value not meant to be readable.'
            required: true
        salt:
            type: text
            label: Password Salt
            description: 'Auto populated field on user creation. Used internally.'
            required: false
        email:
            type: text
            label: E-Mail
            required: true
            unique: true
role:
    label: Roles
    table: role
    fields:
        role:
            type: text
            label: Role
            required: true
userRole:
    label: User Roles
    table: user_role
    fields:
        user:
            type: reference
            label: User
            reference:
                nameField: username
                entity: user
            required: true
        role:
            type: reference
            label: Role
            reference:
                nameField: role
                entity: role
            required: true
passwordReset:
    label: Password Resets
    table: password_reset
    fields:
        user:
            type: reference
            label: User
            reference:
                nameField: username
                entity: user
            required: true
        token:
            type: text
            label: Token
            required: true
        reset:
            type: datetime
            label: Reset
