2018-11-20 00:32:55 +01:00
|
|
|
package main
|
|
|
|
|
2019-01-06 01:53:33 +01:00
|
|
|
//struktura użytkownika
|
|
|
|
/*
|
|
|
|
CREATE TABLE users (
|
|
|
|
userId INT NOT NULL AUTO_INCREMENT,
|
|
|
|
login varchar(50) NOT NULL UNIQUE,
|
|
|
|
password varchar(30) NOT NULL,
|
|
|
|
userDescription varchar(300),
|
|
|
|
points int,
|
|
|
|
|
|
|
|
PRIMARY KEY (userId)
|
|
|
|
);
|
|
|
|
*/
|
|
|
|
type User struct {
|
|
|
|
userId int `json:"id"` // do pobierania z GET
|
|
|
|
login string `json:"login"`
|
|
|
|
password string `json:"password"`
|
|
|
|
userDescription string `json:"userDescription"`
|
|
|
|
points int `json:points`
|
|
|
|
}
|
2018-11-20 00:32:55 +01:00
|
|
|
|
2019-01-06 01:53:33 +01:00
|
|
|
// Structura karty
|
|
|
|
/*
|
|
|
|
*/
|
2019-01-06 16:00:15 +01:00
|
|
|
// type Card struct {
|
|
|
|
// couchdb.Document
|
|
|
|
// id int `json:"id" binding:"required"`
|
|
|
|
// isQuestion bool `json:"typ"` //0 karta pytanie, 1 karta odpowiedź
|
|
|
|
// blank int `json:"puste" binding:"required"` //ile kart odpowiedzi na pytanie
|
|
|
|
// text string `json:"tekst" binding:"required"` // podłoga to luka
|
|
|
|
// }
|