details:
    type: usersParents
    name: User - Data - Parent
    desc: User details for parents/guardians
    category: User
    table: gibbonPerson
    modes: { update: true, insert: true, export: false }
access:
    module: User Admin
    action: Manage Users
primaryKey:
    gibbonPersonID
uniqueKeys:
    - username
table:
    title:
        name: "Title"
        desc: "e.g. Ms., Miss, Mr., Mrs., Dr."
        args: {filter: string}
    surname:
        name: "Surname"
        desc: "Family Name"
        args: {filter: string, required: true}
    firstName:
        name: "First Name"
        desc: "Given name"
        args: {filter: string, required: true}
    preferredName:
        name: "Preferred Name"
        desc: "Most common name, alias, nickname, handle, etc"
        args: {filter: string, required: true}
    officialName:
        name: "Official Name"
        desc: "Full name as shown in ID documents."
        args: {filter: string, required: true}
    nameInCharacters:
        name: "Name In Characters"
        desc: "Chinese or other character-based name."
        args: {filter: string}
    gender:
        name: "Gender"
        desc: ""
        args: {filter: gender, required: true}
    dob:
        name: "Date of Birth"
        desc: ""
        args: {filter: date}
    username:
        name: "Username"
        desc: "Must be unique."
        args: {filter: nospaces, required: true}
    passwordStrong:
        name: "Password"
        desc: ""
        args: {filter: nospaces, required: true, custom: true, function: generatePassword}
    passwordForceReset:
        name: "Force Reset Password?"
        desc: ""
        args: {filter: yesno, custom: true}
    status:
        name: "Status"
        desc: ""
        args: {filter: status, custom: true}
    canLogin:
        name: "Can Login?"
        desc: ""
        args: {filter: yesno, custom: true}
    gibbonRoleIDPrimary:
        name: "Primary Role"
        desc: "Name"
        args: {filter: string, required: true, custom: true }
        relationship: { table: gibbonRole, key: gibbonRoleID, field: name  }
    gibbonRoleIDAll:
        name: "All Roles"
        desc: "Role Names, Comma separated"
        args: {filter: csv, required: true, custom: true }
        relationship: { table: gibbonRole, key: gibbonRoleID, field: name  }
    email:
        name: "Email"
        desc: ""
        args: {filter: email}
    emailAlternate:
        name: "Alternate Email"
        desc: ""
        args: {filter: email}

    studentID:
        name: "Student ID"
        desc: "Must be unique if set."
        args: {filter: string}

    address1:
        name: "Address 1"
        desc: "Unit, Building, Street"
        args: {filter: string}
    address1District:
        name: "Address 1 District"
        desc: "County, State, District"
        args: {filter: string}
    address1Country:
        name: "Address 1 Country"
        desc: ""
        args: {filter: country}

    address2:
        name: "Address 2"
        desc: "Unit, Building, Street"
        args: {filter: string}
    address2District:
        name: "Address 2 District"
        desc: "County, State, District"
        args: {filter: string}
    address2Country:
        name: "Address 2 Country"
        desc: ""
        args: {filter: country}

    phone1Type:
        name: "Phone 1 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    phone1CountryCode:
        name: "Phone 1 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode}
    phone1:
        name: "Phone 1"
        desc: "No spaces or punctuation, just numbers"
        args: {filter: phone}

    phone2Type:
        name: "Phone 2 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    phone2CountryCode:
        name: "Phone 2 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode}
    phone2:
        name: "Phone 2"
        desc: "No spaces or punctuation, just numbers"
        args: {filter: phone}

    phone3Type:
        name: "Phone 3 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    phone3CountryCode:
        name: "Phone 3 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode}
    phone3:
        name: "Phone 3"
        desc: "No spaces or punctuation, just numbers"
        args: {filter: phone}

    phone4Type:
        name: "Phone 4 (Type)"
        desc: "Mobile, Home, Work, Fax, Pager, Other"
        args: {filter: phonetype, custom: true}
    phone4CountryCode:
        name: "Phone 4 (Country Code)"
        desc: "IDD code, without 00 or +"
        args: {filter: phonecode}
    phone4:
        name: "Phone 4"
        desc: "No spaces or punctuation, just numbers"
        args: {filter: phone}

    website:
        name: "Website"
        desc: "Must start with http:// or https://"
        args: {filter: url}

    languageFirst:
        name: "First Language"
        desc: ""
        args: {filter: language }
    languageSecond:
        name: "Second Language"
        desc: ""
        args: {filter: language }
    languageThird:
        name: "Third Language"
        desc: ""
        args: {filter: language }
    countryOfBirth:
        name: "Country of Birth"
        desc: ""
        args: {filter: country}
    ethnicity:
        name: "Ethnicity"
        desc: ""
        args: {filter: ethnicity}
    religion:
        name: "Religion"
        desc: ""
        args: {filter: string}

    profession:
        name: "Profession"
        desc: "For parents only"
        args: {filter: string}
    employer:
        name: "Employer"
        desc: "For parents only"
        args: {filter: string}
    jobTitle:
        name: "Job Title"
        desc: "For parents only"
        args: {filter: string}

    transport:
        name: "Transport"
        desc: ""
        args: {filter: string}
    transportNotes:
        name: "Transport Notes"
        desc: ""
        args: {filter: string}
    vehicleRegistration:
        name: "Vehicle Registration"
        desc: ""
        args: {filter: string}
    receiveNotificationEmails:
        name: "Receive Email Notifications?"
        desc: ""
        args: {filter: yesno, custom: true}
