fix(_createdAt/_updatedAt): fields are now ISO format
This commit is contained in:
		@@ -3,6 +3,6 @@
 | 
			
		||||
 */
 | 
			
		||||
export const commitinfo = {
 | 
			
		||||
  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.'
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -192,13 +192,13 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
 | 
			
		||||
   * updated from db in any case where doc comes from db
 | 
			
		||||
   */
 | 
			
		||||
  @svDb()
 | 
			
		||||
  _createdAt: number = Date.now();
 | 
			
		||||
  _createdAt: string = (new Date()).toISOString();
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * will be updated everytime the doc is saved
 | 
			
		||||
   */
 | 
			
		||||
  @svDb()
 | 
			
		||||
  _updatedAt: number = Date.now();
 | 
			
		||||
  _updatedAt: string = (new Date()).toISOString();
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * unique indexes
 | 
			
		||||
@@ -234,7 +234,7 @@ export class SmartDataDbDoc<T extends TImplements, TImplements, TManager extends
 | 
			
		||||
    const self: any = this;
 | 
			
		||||
    let dbResult: any;
 | 
			
		||||
 | 
			
		||||
    this._updatedAt = Date.now();
 | 
			
		||||
    this._updatedAt = (new Date()).toISOString();
 | 
			
		||||
 | 
			
		||||
    switch (this.creationStatus) {
 | 
			
		||||
      case 'db':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user