from _testcapi import return_null_without_error

from django.db import models

# Create your models here.
class Stock(models.Model):
    ID = 'id'
    TICKER = 'ticker'
    OPEN = 'open'
    CLOSE = 'close'
    VOLUME = 'volume'

    ticker = models.CharField(max_length=10)
    open = models.FloatField()
    close = models.FloatField()
    volume = models.IntegerField()

    def __str__(self):
        return self.ticker

    def to_dict(self):
        res = {
            Stock.ID: self.id,
            Stock.TICKER: self.ticker,
            Stock.OPEN: self.open,
            Stock.CLOSE: self.close,
            Stock.VOLUME: self.volume
        }
        return res
736a8a6c57b08d3986757023add6415bca667101
<mask token>


class Stock(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return self.ticker
    <mask token>

<mask token>


class Stock(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return self.ticker

    def to_dict(self):
        res = {Stock.ID: self.id, Stock.TICKER: self.ticker, Stock.OPEN:
            self.open, Stock.CLOSE: self.close, Stock.VOLUME: self.volume}
        return res

<mask token>


class Stock(models.Model):
    ID = 'id'
    TICKER = 'ticker'
    OPEN = 'open'
    CLOSE = 'close'
    VOLUME = 'volume'
    ticker = models.CharField(max_length=10)
    open = models.FloatField()
    close = models.FloatField()
    volume = models.IntegerField()

    def __str__(self):
        return self.ticker

    def to_dict(self):
        res = {Stock.ID: self.id, Stock.TICKER: self.ticker, Stock.OPEN:
            self.open, Stock.CLOSE: self.close, Stock.VOLUME: self.volume}
        return res

from _testcapi import return_null_without_error
from django.db import models


class Stock(models.Model):
    ID = 'id'
    TICKER = 'ticker'
    OPEN = 'open'
    CLOSE = 'close'
    VOLUME = 'volume'
    ticker = models.CharField(max_length=10)
    open = models.FloatField()
    close = models.FloatField()
    volume = models.IntegerField()

    def __str__(self):
        return self.ticker

    def to_dict(self):
        res = {Stock.ID: self.id, Stock.TICKER: self.ticker, Stock.OPEN:
            self.open, Stock.CLOSE: self.close, Stock.VOLUME: self.volume}
        return res

from _testcapi import return_null_without_error

from django.db import models

# Create your models here.
class Stock(models.Model):
    ID = 'id'
    TICKER = 'ticker'
    OPEN = 'open'
    CLOSE = 'close'
    VOLUME = 'volume'

    ticker = models.CharField(max_length=10)
    open = models.FloatField()
    close = models.FloatField()
    volume = models.IntegerField()

    def __str__(self):
        return self.ticker

    def to_dict(self):
        res = {
            Stock.ID: self.id,
            Stock.TICKER: self.ticker,
            Stock.OPEN: self.open,
            Stock.CLOSE: self.close,
            Stock.VOLUME: self.volume
        }
        return res