# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models

# Create your models here.

class Track(models.Model):
    #owner=models.ForeignKey(user)
    distance=models.FloatField(default=0)
    name=models.CharField(max_length=200)
    round_hike=models.BooleanField(default=True)
    def __str__(self):
        return self.name+" "+str(self.distance)+" round="+str(self.round_hike)

class Point(models.Model):
    north=models.IntegerField()
    east=models.IntegerField()
    elevation=models.FloatField(null=True, blank=True)
    track=models.ForeignKey(Track)
    order=models.IntegerField()#The order for this point
    def __str__(self):
        return self.track.name+" "+str(self.north)+"N "+str(self.east)+"E "+str(self.elevation)+"m"
