I want to create a model like below. users model having attribute agreements of type array.I was not able to find a example in waterline where attributes type is an array of object. Please advise `
module.exports = {
attributes: {
userName: {
type: "string",
unique: true,
required: true
},
Name: {
type: "string",
required: true,
minLength: 2
},
phone: {
type: "string",
required: true
},
password: {
type: "string",
minLength: 6
},
roles: {
type: "array",
required: true,
enum: ['Admin', 'User']
},
agreements: {
type : "array",
agreement :{
version : "string",
dateSigned :"date",
}
},
`