tracking-code-which-will-go-to-the-HEAD FLAMEAL Documentation server/models/userAccount.js

Source

server/models/userAccount.js

import mongoose from "mongoose";
/**
 * The schema of the user account
 * @category REST API
 * @subcategory Schema
 * @type {mongoose.Schema}
 */
const UserSchema = mongoose.Schema(
  {
    publicAddress: { type: String, required: true, unique: true, index: true },
    nonce: { type: String, required: true },
    name: { type: String, unique: true, required: true },
    isFoodBank: { type: Boolean },
    inventory: { type: String },
  },
  { collection: "user-data", strict: true }
);

const UserAccount = mongoose.model("UserSchema", UserSchema);

export default UserAccount;