-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.py
27 lines (24 loc) · 816 Bytes
/
model.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
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import peewee, datetime
db = peewee.SqliteDatabase('banco.db')
class Ente(peewee.Model):
nome = peewee.CharField()
municipio = peewee.CharField()
link_transparencia = peewee.CharField()
link_licitacoes = peewee.CharField()
link_contratos = peewee.CharField()
esfera = peewee.CharField()
classificacao = peewee.CharField()
ativo = peewee.CharField()
class Meta:
database = db
class HistoricoDeAcesso(peewee.Model):
# disponivel = peewee.BooleanField()
licitacoes = peewee.BooleanField()
contratos = peewee.BooleanField()
portal_transparencia = peewee.BooleanField()
data_hora = peewee.DateTimeField(default=datetime.datetime.now)
ente = peewee.ForeignKeyField(Ente)
class Meta:
database = db