Initial model classes written. Still a few additions needed.
[philo.git] / contrib / julian / models.py
index 71a8362..049473c 100644 (file)
@@ -1,3 +1,22 @@
 from django.db import models
+from philo.models.base import Tag, Entity, Titled
+import datetime
+
+class Location(Entity, Titled):
+       slug = models.SlugField(max_length=255, unique=True)
+
+
+class Calendar(Entity, Titled):
+       slug = models.SlugField(max_length=255, unique=True)
+
+
+class Event(Entity, Titled):
+       description = models.TextField()
+       start_time = models.DateTimeField()
+       end_time = models.DateTimeField()
+       is_all_day_event = models.BooleanField(default=False)
+       time_created = models.DateTimeField(default=datetime.datetime.now)
+       location = models.ForeignKey(Location)
+       calendars = models.ManyToManyField(Calendar)
+       tags = models.ManyToManyField(Tag)
 
-# Create your models here.