Add activities management
This commit is contained in:
		
							parent
							
								
									9151a88ce5
								
							
						
					
					
						commit
						dcbd5015d2
					
				
					 3 changed files with 91 additions and 1 deletions
				
			
		|  | @ -11,8 +11,25 @@ class Activity extends Entry { | |||
| 
 | ||||
|     constructor(PROPERTIES) { | ||||
|         super(PROPERTIES); | ||||
| 
 | ||||
|         // Set a default date value. 
 | ||||
|         this.date = this.date ? this.date : new Date(Date.now()); | ||||
|         this.set_date(this.date);     | ||||
|     }; | ||||
| 
 | ||||
|     /*  | ||||
| 		Store the date with the corresponding ECMA value. If not, the existing date value is converted.  | ||||
| 
 | ||||
|         @param {Date} DATE the date | ||||
|         @return {Number} the date in ECMA | ||||
| 	*/ | ||||
|     set_date(DATE) { | ||||
|         if (DATE || this.date) { | ||||
|             this.date = parseInt((new Date(DATE || this.date)).getTime()); | ||||
|             return (this.date); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     /*  | ||||
|     Generate a schema for MongoDB.  | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue