from django.db import models
from transacciones.models import Transaccion
from modulos.models import Modulo
# Create your models here.
class Formula(models.Model):
	id_formulas=models.AutoField(primary_key=True)
	nombre_formula = models.CharField(max_length=200)
	formula = models.CharField(max_length=200)
	id_transaccion=models.ForeignKey(Transaccion)
	id_modulo=models.ForeignKey(Modulo)
	tablas_asociadas=models.CharField(max_length=200, null=True)
	usa_tablas=models.IntegerField(max_length=1, null=True)
	class Meta:
		db_table = u'ic_formula'
	def __unicode__(self):
		return self.id_formulas