Fix Joker
[vchess.git] / server / models / Variant.js
CommitLineData
c5c47010 1const db = require("../utils/database");
8d7e2786
BA
2
3/*
4 * Structure:
c018b304 5 * id: integer
8d7e2786 6 * name: varchar
eaa5ad3e
BA
7 * display: varchar
8 * groupe: integer
8d7e2786 9 * description: varchar
eaa5ad3e 10 * noProblems: boolean
8d7e2786
BA
11 */
12
0234201f 13const VariantModel = {
937c24ab 14
0234201f 15 getAll: function(callback) {
dac39588
BA
16 db.serialize(function() {
17 const query =
18 "SELECT * " +
19 "FROM Variants";
20 db.all(query, callback);
21 });
937c24ab 22 }
ab4f4bf2 23
dac39588 24 //create, update, delete: directly in DB
937c24ab
BA
25
26};
8d7e2786 27
ab4f4bf2 28module.exports = VariantModel;