aboutsummaryrefslogtreecommitdiff
path: root/rpkid/rpki/gui/app/models.py
diff options
context:
space:
mode:
authorMichael Elkins <melkins@tislabs.com>2012-01-17 05:03:13 +0000
committerMichael Elkins <melkins@tislabs.com>2012-01-17 05:03:13 +0000
commit8e93a1c1b6678b8c146d09291fb2575580b094b2 (patch)
treee0ace0990d2c2aa98c4510d8d92b9198f1d3104e /rpkid/rpki/gui/app/models.py
parent54960d052db93ab95b7126b98a78d90f96c05394 (diff)
add Timestamp model to store metadata for external data
svn path=/branches/tk161/; revision=4168
Diffstat (limited to 'rpkid/rpki/gui/app/models.py')
-rw-r--r--rpkid/rpki/gui/app/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/rpkid/rpki/gui/app/models.py b/rpkid/rpki/gui/app/models.py
index 2fc3028d..d4232274 100644
--- a/rpkid/rpki/gui/app/models.py
+++ b/rpkid/rpki/gui/app/models.py
@@ -251,4 +251,14 @@ class Ghostbuster(models.Model):
class Meta:
ordering = ( 'family_name', 'given_name' )
+class Timestamp(models.Model):
+ """Model to hold metadata about the collection of external data.
+
+ This model is a hash table mapping a timestamp name to the
+ timestamp value. The timestamp value has `auto_now=True` so it
+ merely needs to be saved to be updated."""
+
+ name = models.CharField(max_length=30, primary_key=True)
+ ts = models.DateTimeField(null=False, auto_now=True)
+
# vim:sw=4 ts=8 expandtab