Add Created and Updated fields to generated structs
jscharber opened this issue · comments
The code expects date time stamps for each row. Currently, these are inserted in the YAML instead of being generated automatically. If an end-user forgets them, the code breaks when executed.
We want to modify cmd/templates.go to include them automatically
92 // structUUID
93 // name of table, type of data json|yaml
94 const structUUID = "\t%sUUID string %s:%suuid
\n"
... const structCreated = ...
const struct Updated = ...
Note, the JSON field string is also not proper
const structUUID = "\t%sUUID string %s:%suuid
\n"
should include quotes like this
const structUUID = "\t%sUUID string %s:**"**%suuid**"**
\n"