from django.db import models # Create your models here. class BhavCopyEquity(models.Model): id = models.AutoField(primary_key=True) date = models.DateField(auto_now_add=True, editable=False) # Ref: https://www.bseindia.com/markets/debt/BhavCopyhelp.aspx sc_code = models.PositiveIntegerField() sc_name = models.CharField(max_length=20) sc_group = models.CharField(max_length=2) sc_type = models.CharField(max_length=1) open_price = models.DecimalField(max_digits=12, decimal_places=2) high_price = models.DecimalField(max_digits=12, decimal_places=2) low_price = models.DecimalField(max_digits=12, decimal_places=2) close_price = models.DecimalField(max_digits=12, decimal_places=2) last_price = models.DecimalField(max_digits=12, decimal_places=2) prevclose_price = models.DecimalField(max_digits=12, decimal_places=2) no_trades = models.PositiveIntegerField() no_of_shrs = models.PositiveIntegerField() net_turnov = models.PositiveIntegerField() tdcloindi = models.TextField(blank=True) def __str__(self): return f'{self.date}-{self.sc_code}'