/* Generic data suitable for all kind of boats
 * SPDX-License-Identifier: WTFPL
 */

/* absolutely minimal data set */

-- Trick to get pk value 0 for autoincrement
INSERT INTO user (userid, login, pass, displayname, role) VALUES (0, '', '', 'SYSTEM', 'vessel');
UPDATE user SET userid=0 WHERE userid=1;

INSERT INTO user (userid, login, pass, displayname, role) VALUES
(1, 'captain', '$2y$10$naVMnC4S6bZ3IakxLJPJK.iSazlkYxVLeiRt9CB/j0jSExQZU1SCK', 'Captain', 'captain');

INSERT INTO settings (userid, sno, valint) VALUES
(0, 0, 1),      -- Database schema version
(0, 1, 0),      -- No vessel assignment to SYSTEM
(1, 1, 0),      -- No vessel assignment to user "captain"
(0, 20, 1280),  -- Image width limit
(0, 21, 1024);  -- Image height limit

/* setting descriptions */
INSERT INTO settings (userid, sno, valstr) VALUES
(-1, 1, 'vessel id'),
(-1, 2, 'date format'),
(-1, 10, 'rows in table'),
(-1, 20, 'maximum image width'),
(-1, 21, 'maximum image height'),
(-1, 100, 'equipment sorting order'),
(-1, 101, 'inventory sorting order'),
(-1, 102, 'provision sorting order'),
(-1, 103, 'storage sorting order'),
(-1, 104, 'maintenance sorting order'),
(-1, 105, 'project sorting order'),
(-1, 106, 'task sorting order'),
(-1, 107, 'measurement sorting order'),
(-1, 108, 'company sorting order'),
(-1, 109, 'document sorting order'),
(-1, 110, 'tag sorting order'),
(-1, 111, 'cable sorting order'),
(-1, 112, 'fuse sorting order'),
(-1, 200, 'equipment filter json'),
(-1, 201, 'inventory filter json'),
(-1, 202, 'provision filter json'),
(-1, 203, 'storage filter json'),
(-1, 204, 'maintenance filter json'),
(-1, 205, 'project filter json'),
(-1, 206, 'task filter json'),
(-1, 207, 'measurement filter json'),
(-1, 208, 'company filter json'),
(-1, 209, 'document filter json'),
(-1, 210, 'tag filter json'),
(-1, 211, 'cable filter json'),
(-1, 212, 'fuse filter json');

/* Liste der Listen wird immer benötigt */
INSERT INTO dropdown (ddid, ddval, ddtext) VALUES
(0, 0, 'Liste der Listen'),
(0, 1, 'Rumpftypen'),
(0, 2, 'Firmentypen'),
(0, 3, 'Stauraumtypen'),
(0, 4, 'Ausrüstungskategorien'),
(0, 5, 'Proviantkategorien'),
(0, 6, 'Provianteinheiten'),
(0, 7, 'Sicherungstypen'),
(0, 8, 'Einheiten'),
(0, 9, 'Kistentypen'),
(0, 10, 'Sicherungsblöcke'), -- fuse locations
(0, 11, 'Kabeltypen');

INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(2, 1, 'Lieferant', 'fixed'),
(2, 2, 'Hersteller', 'fixed'),
(2, 3, 'Werft', 'fixed'), -- to store yacht manufacturer
(2, 9, 'Sonstiges', 'fixed');

INSERT INTO dropdown (ddid, ddval, ddtext, flags) VALUES
(3, 0, 'Stauraum allgemein', 'fixed'),
(3, 1, 'Tank', 'fixed');
