File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ const config = {
2828 uploadPath : "../evolutility-ui-react/public/pix/" ,
2929
3030 // - Optional fields
31- // - Timestamp columns created_at and updated_at w/ date of record creation and last update
31+ // - Timestamp columns " created_at" and " updated_at" w/ date of record creation and last update
3232 wTimestamp : true ,
33- // - "WhoIs" columns u_uid and c_uid w/ userid of creator and last modifier
33+ // - "WhoIs" columns "created_by" and "updated_by" w/ userid of creator and last modifier
3434 wWhoIs : false ,
3535 // - Comments & Ratings (community feature)
3636 wComments : false ,
Original file line number Diff line number Diff line change @@ -49,11 +49,14 @@ const ft_postgreSQL = {
4949 json : "json" ,
5050} ;
5151
52+ const createdDateCol = config . createdDateColumn || "created_at" ;
53+ const updatedDateCol = config . updatedDateColumn || "update_at" ;
54+
5255const sysColumns = {
53- c_date : true ,
54- u_date : true ,
55- c_uid : true ,
56- u_uid : true ,
56+ [ createdDateCol ] : true ,
57+ [ updatedDateCol ] : true ,
58+ created_by : true ,
59+ updated_by : true ,
5760 nb_comments : true ,
5861 nb_ratings : true ,
5962 avg_ratings : true ,
@@ -337,8 +340,8 @@ function sqlModel(mid) {
337340 }
338341 // - "who-is" columns to track user who created and last modified the record.
339342 if ( config . wWhoIs ) {
340- fs . push ( " c_uid integer" ) ;
341- fs . push ( " u_uid integer" ) ;
343+ fs . push ( " created_by integer" ) ;
344+ fs . push ( " updated_by integer" ) ;
342345 }
343346
344347 // - tracking number of comments.
Original file line number Diff line number Diff line change @@ -60,12 +60,12 @@ if (config.wWhoIs) {
6060 {
6161 // - record creator (user.id)
6262 type : "integer" ,
63- column : "c_uid " ,
63+ column : "created_by " ,
6464 } ,
6565 {
6666 // - record last editor (user.id)
6767 type : "integer" ,
68- column : "u_uid " ,
68+ column : "updated_by " ,
6969 }
7070 ) ;
7171}
You can’t perform that action at this time.
0 commit comments