11# -*- coding: utf-8 -*-
22from __future__ import absolute_import , unicode_literals
33
4- # Standard Library
54from datetime import datetime
65
7- # Third Party Stuff
86from django .contrib .auth .models import User
97from django .core .urlresolvers import reverse
108from django .db import models
1412from hashids import Hashids
1513from simple_history .models import HistoricalRecords
1614
17- # Junction Stuff
18- from junction . base . constants import ProposalReviewStatus , ProposalStatus , ProposalTargetAudience , \
19- ProposalUserVoteRole , ProposalReviewVote
15+ from junction . base . constants import PSRVotePhase , ProposalCommentType , \
16+ ProposalReviewStatus , ProposalReviewVote , ProposalStatus , \
17+ ProposalTargetAudience , ProposalUserVoteRole
2018from junction .base .models import AuditModel , TimeAuditModel
2119from junction .conferences .models import Conference , ConferenceProposalReviewer
2220
@@ -122,6 +120,10 @@ def get_vote_url(self):
122120 return reverse ('proposal-reviewer-vote' ,
123121 args = [self .conference .slug , self .slug ])
124122
123+ def get_secondary_vote_url (self ):
124+ return reverse ('proposal-reviewer-secondary-vote' ,
125+ args = [self .conference .slug , self .slug ])
126+
125127 def get_delete_url (self ):
126128 return reverse ('proposal-delete' ,
127129 args = [self .conference .slug , self .slug ])
@@ -263,16 +265,18 @@ class ProposalSectionReviewerVote(TimeAuditModel):
263265 role = models .PositiveSmallIntegerField (
264266 choices = ProposalUserVoteRole .CHOICES , default = ProposalUserVoteRole .REVIEWER )
265267 vote_value = models .ForeignKey (ProposalSectionReviewerVoteValue )
268+ phase = models .PositiveSmallIntegerField (choices = PSRVotePhase .CHOICES , default = PSRVotePhase .PRIMARY )
269+
266270 history = HistoricalRecords ()
267271
268272 def __str__ (self ):
269273 return "[{}] {}" .format (self .vote_value , self .proposal )
270274
271275 class Meta :
272- unique_together = ("proposal" , "voter" )
273276 verbose_name = 'ProposalSectionReviewerVote'
274277
275278
279+ # FIXME: Need to move private, reviewer, vote to type
276280@python_2_unicode_compatible
277281class ProposalComment (TimeAuditModel ):
278282
@@ -284,7 +288,8 @@ class ProposalComment(TimeAuditModel):
284288 vote = models .BooleanField (default = False , verbose_name = "What is the reason?" )
285289 comment = models .TextField ()
286290 deleted = models .BooleanField (default = False , verbose_name = "Is Deleted?" )
287-
291+ comment_type = models .PositiveSmallIntegerField (
292+ choices = ProposalCommentType .CHOICES , default = ProposalCommentType .GENERAL )
288293 objects = ProposalCommentQuerySet .as_manager ()
289294
290295 def __str__ (self ):
0 commit comments