summaryrefslogtreecommitdiff
path: root/project/scipycon/base/models.py
blob: 63970d27e857dfe61d3a769a13b0dbafdd17f175 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from django.db import models
from django.core.management.validation import max_length


class Event(models.Model):
    """Data model which holds the data related to the scope or the event.
    """

    # Different states the Event can be in
    STATUS_CHOICES = (
        ('active', 'Active'),
        ('inactive', 'Inactive'),
    )

    # Scope of the program, used as a URL prefix
    scope = models.CharField(max_length=255)

    # Name of the program
    name = models.CharField(max_length=255)

    # Event specific i.e version of the event
    turn = models.CharField(max_length=255)

    # Time associated with the program
    timeline = models.OneToOneField(Timeline)

    # Status of the program
    status = models.CharField(max_length=255, choices=STATUS_CHOICES)


class Timeline(models.Model):
    """Timeline of the program
    """

    # Start of registration for the program
    registration_start = models.DateTimeField()

    # End of registration for the program
    registration_end = models.DateTimeField()

    # Start of Call for Papers
    cfp_start = models.DateTimeField()

    # End of Call for Papers
    cfp_end = models.DateTimeField()

    # Accepted papers announced
    accepted_papers_announced = models.DateTimeField()

    # Deadline to submit proceedings paper
    proceedings_paper_deadline = models.DateTimeField()

    # Start of the actual program
    event_start = models.DateTimeField()

    # End of the actual program
    event_end = models.DateTimeField()


class ScopedBase(models.Model):
    """Base model which is in turn inherited by other models
    which needs to be scoped.
    """

    # Scope of entity in which it is visible
    scope = models.ForeignKey(Scope)

    class Meta:
        abstract = True