bullish/backend/app/models.py
Ameya Shenoy e110616d67
feat: basic django app with docker-compose
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
2021-02-09 03:32:14 +05:30

28 lines
1.1 KiB
Python

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()
def __str__(self):
return f'{self.DATE}-{self.SC_CODE}'