mirror of
				https://github.com/monkeytypegame/monkeytype.git
				synced 2025-10-31 11:16:08 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			371 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			371 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const mongoose = require("mongoose");
 | |
| const Schema = mongoose.Schema;
 | |
| 
 | |
| const statsSchema = new Schema(
 | |
|   {
 | |
|     completedTests: { type: Number, default: 0 },
 | |
|     startedTests: { type: Number, default: 0 },
 | |
|     timeTyping: { type: Number, default: 0 },
 | |
|   },
 | |
|   {
 | |
|     timestamps: true,
 | |
|   }
 | |
| );
 | |
| 
 | |
| const Stats = mongoose.model("Stats", statsSchema);
 | |
| 
 | |
| module.exports = { Stats };
 |