mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 05:12:10 +08:00
23 lines
429 B
JavaScript
23 lines
429 B
JavaScript
'use strict';
|
|
|
|
const mongoose = require('../mongoose');
|
|
const uuid = require('uuid');
|
|
const Schema = mongoose.Schema;
|
|
|
|
const UserSchema = new Schema({
|
|
id: {
|
|
type: String,
|
|
default: uuid.v4,
|
|
unique: true
|
|
},
|
|
name: String,
|
|
created_at: { type: Date, default: Date.now },
|
|
updated_at: { type: Date, default: Date.now }
|
|
},{
|
|
_id: false
|
|
});
|
|
|
|
const User = mongoose.model('User', UserSchema);
|
|
|
|
module.exports = User;
|