node.js - Storing only necessary data in Sails Model -
I'm new to Pal and I'm facing a small problem with the model.
I have defined a user model as follows: module.exports = {attributes: {firstName: {type: ' String '}, lastName: {type:' string '},, password: {type:' string '}, password salt: {type:' string '}, projects: {collection:' projectmember ', via:' user Id'}}};
I have another model called a plan whose user is in the form of a foreign key:
module.exports = {planId: {Type: 'string'}, User id: {Model: 'user'}}; Now store all user data. Either way, I can restrict the planning model to keep only some personal information such as first name, last name, email, and project members rather than collecting other personal information. Like password, password salt etc?
Thanks in advance
The plan is not collecting data from the user, it only A reference to the user data found in the user model is stored.
Comments
Post a Comment