Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Rowan-Paul/gwentapi. API for Rowan-Paul/GWENTcards repo old.gwentcards.net
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677const mongoose = require('mongoose')const LocationsSchema = require('./Locations')
const CardSchema = new mongoose.Schema({ name: { type: String, required: true, }, deck: { type: String, required: true, enum: [ 'neutral', 'monsters', 'nilfgaard', 'northern realms', "scoia'tael", 'skellige', ], }, row: { type: String, required: false, enum: ['close', 'ranged', 'siege', 'leader', 'agile'], }, strength: { type: Number, required: false, }, locations: { type: [LocationsSchema], required: true, }, abilities: { type: [String], required: false, default: undefined, enum: [ 'agile', 'hero', 'medic', 'morale boost', 'muster', 'spy', 'tight bond', ], }, effect: { type: String, required: false, enum: [ 'weather', 'decoy', "commander's horn", 'scorch', 'summon avenger', 'mardroeme', 'berserker', ], }, notes: { type: String, required: false, }, isDLC: { type: Boolean, required: true, default: false, }, expansion: { type: String, required: false, },})
module.exports = mongoose.model('Card', CardSchema)