From 1d85fd12e8d450683e48e11be47547091e29f5bc Mon Sep 17 00:00:00 2001
From: Brian Moe <brian.moe@ligo.org>
Date: Thu, 2 Jul 2009 15:26:55 -0500
Subject: [PATCH] Added Approval model.

---
 gracedb/models.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gracedb/models.py b/gracedb/models.py
index 1d7c37ebe..8401cf0f9 100755
--- a/gracedb/models.py
+++ b/gracedb/models.py
@@ -71,10 +71,6 @@ class Group(models.Model):
         return self.name
 
 
-class Approval(models.Model):
-    approver = models.ForeignKey(User)
-    created = models.DateTimeField(auto_now_add=True)
-
 class Event(models.Model):
     ANALYSIS_TYPE_CHOICES = (
         ("LM",  "LowMass"),
@@ -92,9 +88,6 @@ class Event(models.Model):
     created = models.DateTimeField(auto_now_add=True)
     group = models.ForeignKey(Group)
     analysisType = models.CharField(max_length=20, choices=ANALYSIS_TYPE_CHOICES)
-#   ligoApproved = models.ForeignKey(Approval, null=True)
-#   virgoApproved = models.ForeignKey(Approval, null=True)
-
     def weburl(self):
         return "https://ldas-jobs.phys.uwm.edu/gracedb/data/%s" % self.uid
 
@@ -104,3 +97,10 @@ class Event(models.Model):
     def clusterurl(self):
         return "pcdev1.phys.uwm.edu:/archive/gracedb/data/%s" % self.uid
 
+class Approval(models.Model):
+    COLLABORATION_CHOICES = ( ('L','LIGO'), ('V','Virgo'), )
+    approver = models.ForeignKey(User)
+    created = models.DateTimeField(auto_now_add=True)
+    approvedEvent = models.ForeignKey(Event, null=False)
+    approvingCollaboration = models.CharField(max_length=1, choices=COLLABORATION_CHOICES)
+
-- 
GitLab