request.py 538 B

1234567891011121314151617181920
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import models
  4. from django.contrib.auth.models import User
  5. from core.models.base import Base
  6. REQUEST_STATUSES = (
  7. (1, 'Abierto'),
  8. (2, 'Rechazado'),
  9. (3, 'Procesando'),
  10. (4, 'Hecho'),
  11. (5, 'Error'),
  12. )
  13. '''
  14. '''
  15. class Request(Base):
  16. status = models.PositiveSmallIntegerField(choices=REQUEST_STATUSES, default=1)
  17. issue = models.CharField(max_length=100, blank=True)
  18. user = models.ForeignKey(User, on_delete=models.CASCADE, null=True)