I have a model like this -
{
"name": "MakeCallTestConfiguration",
"base": "PersistedModel",
"idInjection": true,
"properties": {
"id": {
"type": "number",
"id": true,
"generated": true
},
"destination": {
"type": "string",
"required": true
},
"clientId": {
"type": "number",
"required": true
},
"logTime":{
"type" : "date",
}
},
"validations": [],
"relations": {},
"acls": [],
"methods": []
}
For "logTime", how can I have auto generated time stamp? I mean something like
"TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP"
You can use the "$now" attribute
"logTime":{
"type": "date",
"required": true,
"default": "$now"
}