# Path: location/models.py
# class Location(models.Model):
# 	loc_id = models.AutoField(primary_key=True)
# 	city = models.CharField(max_length=30)
# 	state = models.CharField(max_length=30)
# 
# 	def __unicode__(self):
# 		return self.city + ', ' + self.state
# 	def __str__(self):
# 		return self.city + ', ' + self.state


from django.db import models
from location.models import Location
# -*- coding: utf-8 -*-
from __future__ import unicode_literals


# Create your models here.

# Create your models here.
class Farmer(models.Model):
	"""docstring for Farmer"""
	auto_id = models.AutoField(primary_key=True)
	name = models.CharField(max_length=30)

	user_id = models.EmailField(max_length=30,unique=True)
	user_pwd = models.CharField(max_length=100)

	contact = models.BigIntegerField()
	

# Path: location/models.py
# class Location(models.Model):
# 	loc_id = models.AutoField(primary_key=True)
# 	city = models.CharField(max_length=30)
# 	state = models.CharField(max_length=30)
# 
# 	def __unicode__(self):
# 		return self.city + ', ' + self.state
# 	def __str__(self):
# 		return self.city + ', ' + self.state


# Path: User/models.py
from django.db import models
from location.models import Location

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


# Create your models here.

# Create your models here.
class Farmer(models.Model):
	"""docstring for Farmer"""
	auto_id = models.AutoField(primary_key=True)
	name = models.CharField(max_length=30)

	user_id = models.EmailField(max_length=30,unique=True)
	user_pwd = models.CharField(max_length=100)

	contact = models.BigIntegerField()
	

	location = models.ForeignKey(Location, on_delete=models.CASCADE)