-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
48 lines (38 loc) · 1.75 KB
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from jogoteca import db
class Jogos(db.Model):
idJogo = db.Column(db.Integer, primary_key=True, autoincrement=True)
timeMandante = db.Column(db.String(50), nullable=False)
timeVisitante = db.Column(db.String(50), nullable=False)
grupo = db.Column(db.String(40), nullable=False)
placar = db.Column(db.String(20), nullable=False)
faltas = db.Column(db.Integer, nullable=False)
cartAmarelo = db.Column(db.Integer, nullable=False)
cartVermelho = db.Column(db.Integer, nullable=False)
def __repr__(self):
return '<Name %r>' % self.name
class Frases(db.Model):
idFrase = db.Column(db.Integer, primary_key=True, autoincrement=True)
Data = db.Column(db.Date, nullable=False)
Frase = db.Column(db.String(300), nullable=False)
def __repr__(self):
return '<Name %r>' % self.name
class Times(db.Model):
idTime = db.Column(db.Integer, primary_key=True, autoincrement=True)
nome = db.Column(db.String(50), nullable=False)
campeonato = db.Column(db.String(100), nullable=False)
qtdJogadores = db.Column(db.Integer, nullable=False)
def __repr__(self):
return '<Name %r>' % self.name
class Torcidas(db.Model):
idTorcida = db.Column(db.Integer, primary_key=True, autoincrement=True)
nome = db.Column(db.String(50), nullable=False)
time = db.Column(db.String(100), nullable=False)
socios = db.Column(db.Integer, nullable=False)
def __repr__(self):
return '<Name %r>' % self.name
class Usuarios(db.Model):
nickname = db.Column(db.String(10), primary_key=True)
nome = db.Column(db.String(50), nullable=False)
senha = db.Column(db.String(100), nullable=False)
def __repr__(self):
return '<Name %r>' % self.name