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