diff --git a/sapl/sessao/migrations/0010_auto_20170810_1033.py b/sapl/sessao/migrations/0010_auto_20170810_1033.py new file mode 100644 index 000000000..b35f9e820 --- /dev/null +++ b/sapl/sessao/migrations/0010_auto_20170810_1033.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.11 on 2017-08-10 10:33 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0009_auto_20170619_1441'), + ] + + operations = [ + migrations.AddField( + model_name='registrovotacao', + name='data_hora_atualizacao', + field=models.DateTimeField(auto_now=True, null=True, verbose_name='Data'), + ), + migrations.AddField( + model_name='registrovotacao', + name='data_hora_criacao', + field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='Data Criação'), + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index 5cd6c6501..027727731 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -400,6 +400,17 @@ class RegistroVotacao(models.Model): observacao = models.TextField( blank=True, verbose_name=_('Observações')) + data_hora_criacao = models.DateTimeField( + blank=True, null=True, + auto_now_add=True, + verbose_name=_('Data Criação')) + + data_hora_atualizacao = models.DateTimeField( + blank=True, null=True, + auto_now=True, + verbose_name=_('Data')) + + class Meta: verbose_name = _('Votação') verbose_name_plural = _('Votações')