Compare commits

..

2 Commits

Author SHA1 Message Date
5a2cc2406c 5.1.2 2024-04-15 14:26:22 +02:00
73a11370b6 fix(_createdAt/_updatedAt): fields are now ISO format 2024-04-15 14:26:21 +02:00
3 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@push.rocks/smartdata", "name": "@push.rocks/smartdata",
"version": "5.1.1", "version": "5.1.2",
"private": false, "private": false,
"description": "An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.", "description": "An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartdata', name: '@push.rocks/smartdata',
version: '5.1.1', version: '5.1.2',
description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.' description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.'
} }

View File

@ -192,13 +192,13 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
* updated from db in any case where doc comes from db * updated from db in any case where doc comes from db
*/ */
@svDb() @svDb()
_createdAt: number = Date.now(); _createdAt: string = (new Date()).toISOString();
/** /**
* will be updated everytime the doc is saved * will be updated everytime the doc is saved
*/ */
@svDb() @svDb()
_updatedAt: number = Date.now(); _updatedAt: string = (new Date()).toISOString();
/** /**
* unique indexes * unique indexes
@ -234,7 +234,7 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
const self: any = this; const self: any = this;
let dbResult: any; let dbResult: any;
this._updatedAt = Date.now(); this._updatedAt = (new Date()).toISOString();
switch (this.creationStatus) { switch (this.creationStatus) {
case 'db': case 'db':