summary refs log tree commit diff
path: root/src/db/schemas/user.js
blob: eaddb086638b53ccc83323259be3644059dc6ad3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { model, Schema } from "mongoose";

export const userSchema = new Schema({
  username: {
    type: String,
    required: true,
    unique: true,
    trim: true,
  },
});

export const User = model("user", userSchema);

console.log("[MONGODB] User schema initialized successfully!");