Skip to content

MongoDB: messy user model #281

@danielsjoo

Description

@danielsjoo

The user model is really messy, and redundant (potential mismatches). Cut the root level to just essential account identifiers, and the optional information for the rest of the saved application information. Update the daos and services accordingly.

  "_id": {
    "$oid": "698218a66980d57d1a0c74ef"
  },
  "address": "100 keepid ave",
  "assignedWorkerUsernames": [],
  "birthDate": "06-02-2001",
  "city": "Studio City",
  "creationDate": {
    "$date": "2026-02-03T15:47:50.275Z"
  },
  "defaultIds": {},
  "email": "daniel.joo@gmail.com",
  "firstName": "test",
  "lastName": "client",
  "logInHistory": [
    {}
  ],
  "onboardingStatus": {
    "minimized": false,
    "situation": "apply-id"
  },
  "optionalInformation": {
    "basicInfo": {
      "emailAddress": "daniel.sh.joo2@gmail.com",
      "genderAssignedAtBirth": "Male",
      "haveDisability": true,
      "mailingAddress": {
        "city": "Studio City",
        "state": "CA",
        "streetAddress": "200 keepid Avenue",
        "zip": "91000"
      },
      "phoneNumber": "167",
      "residentialAddress": {
        "city": "Los Angeles",
        "state": "CA",
        "streetAddress": "Address 2",
        "zip": "91604"
      }
    },
    "demographicInfo": {
      "citizenship": "US_CITIZEN",
      "cityOfBirth": "Los Angeles",
      "countryOfBirth": "United States",
      "languagePreference": "English",
      "race": "ASIAN",
      "stateOfBirth": "California"
    },
    "familyInfo": {
      "children": [],
      "legalGuardians": [],
      "maritalStatus": "MARRIED",
      "parents": [],
      "siblings": []
    },
    "veteranStatus": {
      "protectedVeteran": false,
      "veteran": true,
      "yearsOfService": "4"
    }
  },
  "organization": "Daniel's org",
  "password": "$argon2i$v=19$m=65536,t=10,p=1$QBLSt/pUyKCdY94MdbC/vQ$X0Bvt72c9T+Q74cOtGVFDA3sHhcKTY6Auu4rABeCB9w",
  "phone": "",
  "state": "CA",
  "twoFactorOn": false,
  "privilegeLevel": "Client",
  "username": "danieltest1",
  "zipcode": "9"
}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions