2022-05-29 14:03:17 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import models
|
2024-11-12 13:09:33 +00:00
|
|
|
|
2022-05-29 14:03:17 +00:00
|
|
|
|
|
|
|
# Create your models here.
|
|
|
|
class Coin(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
name = models.CharField(max_length=4, default="0")
|
|
|
|
date = models.DateField(default="0")
|
|
|
|
priceusd = models.FloatField(default="0")
|
|
|
|
pricebtc = models.FloatField(default="0")
|
|
|
|
inflation = models.FloatField(default="0")
|
|
|
|
transactions = models.FloatField(default="0")
|
|
|
|
hashrate = models.FloatField(default="0")
|
|
|
|
stocktoflow = models.FloatField(default="0")
|
|
|
|
supply = models.FloatField(default="0")
|
|
|
|
fee = models.FloatField(default="0")
|
|
|
|
revenue = models.FloatField(default="0")
|
|
|
|
blocksize = models.FloatField(default="0")
|
|
|
|
difficulty = models.FloatField(default="0")
|
|
|
|
|
2022-05-29 14:03:17 +00:00
|
|
|
|
|
|
|
class Social(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
name = models.CharField(max_length=4)
|
|
|
|
date = models.DateField()
|
|
|
|
subscriberCount = models.IntegerField()
|
|
|
|
commentsPerHour = models.FloatField()
|
|
|
|
postsPerHour = models.FloatField()
|
|
|
|
|
2022-05-29 14:03:17 +00:00
|
|
|
|
|
|
|
class Dominance(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
name = models.CharField(max_length=4)
|
|
|
|
date = models.DateField()
|
|
|
|
dominance = models.FloatField()
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.dominance
|
2022-05-29 14:03:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Rank(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
name = models.CharField(max_length=4)
|
|
|
|
date = models.DateField()
|
|
|
|
rank = models.IntegerField()
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.rank
|
2022-05-29 14:03:17 +00:00
|
|
|
|
2022-06-03 18:23:21 +00:00
|
|
|
|
|
|
|
class Sfmodel(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
date = models.DateField()
|
|
|
|
priceusd = models.FloatField()
|
|
|
|
pricebtc = models.FloatField()
|
|
|
|
color = models.FloatField()
|
|
|
|
stocktoflow = models.FloatField()
|
|
|
|
greyline = models.FloatField()
|
|
|
|
|
2022-06-03 18:23:21 +00:00
|
|
|
|
2022-06-05 18:36:57 +00:00
|
|
|
class DailyData(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
# Date field
|
|
|
|
date = models.DateField()
|
|
|
|
|
|
|
|
# Basic information
|
|
|
|
btc_priceusd = models.FloatField()
|
|
|
|
xmr_priceusd = models.FloatField()
|
|
|
|
xmr_pricebtc = models.FloatField()
|
|
|
|
|
|
|
|
# Marketcap charts
|
|
|
|
btc_marketcap = models.FloatField()
|
|
|
|
xmr_marketcap = models.FloatField()
|
|
|
|
dash_marketcap = models.FloatField()
|
|
|
|
grin_marketcap = models.FloatField()
|
|
|
|
zcash_marketcap = models.FloatField()
|
|
|
|
|
|
|
|
# Transactions charts
|
|
|
|
xmr_transacpercentage = models.FloatField()
|
|
|
|
btc_transactions = models.FloatField()
|
|
|
|
xmr_transactions = models.FloatField()
|
|
|
|
zcash_transactions = models.FloatField()
|
|
|
|
dash_transactions = models.FloatField()
|
|
|
|
grin_transactions = models.FloatField()
|
|
|
|
btc_supply = models.IntegerField()
|
|
|
|
xmr_supply = models.IntegerField()
|
|
|
|
|
|
|
|
# Issuance charts
|
|
|
|
btc_inflation = models.FloatField()
|
|
|
|
xmr_inflation = models.FloatField()
|
|
|
|
dash_inflation = models.FloatField()
|
|
|
|
grin_inflation = models.FloatField()
|
|
|
|
zcash_inflation = models.FloatField()
|
|
|
|
xmr_metcalfebtc = models.FloatField()
|
|
|
|
xmr_metcalfeusd = models.FloatField()
|
|
|
|
btc_return = models.FloatField()
|
|
|
|
xmr_return = models.FloatField()
|
|
|
|
btc_emissionusd = models.FloatField()
|
|
|
|
btc_emissionntv = models.FloatField()
|
|
|
|
xmr_emissionusd = models.FloatField()
|
|
|
|
xmr_emissionntv = models.FloatField()
|
|
|
|
|
|
|
|
# Mining charts
|
|
|
|
btc_minerrevntv = models.FloatField()
|
|
|
|
xmr_minerrevntv = models.FloatField()
|
|
|
|
btc_minerrevusd = models.FloatField()
|
|
|
|
xmr_minerrevusd = models.FloatField()
|
|
|
|
btc_minerfeesntv = models.FloatField()
|
|
|
|
xmr_minerfeesntv = models.FloatField()
|
|
|
|
btc_minerfeesusd = models.FloatField()
|
|
|
|
xmr_minerfeesusd = models.FloatField()
|
|
|
|
btc_transcostntv = models.FloatField()
|
|
|
|
xmr_transcostntv = models.FloatField()
|
|
|
|
btc_transcostusd = models.FloatField()
|
|
|
|
xmr_transcostusd = models.FloatField()
|
|
|
|
xmr_minerrevcap = models.FloatField()
|
|
|
|
btc_minerrevcap = models.FloatField()
|
|
|
|
btc_commitntv = models.FloatField()
|
|
|
|
xmr_commitntv = models.FloatField()
|
|
|
|
btc_commitusd = models.FloatField()
|
|
|
|
xmr_commitusd = models.FloatField()
|
|
|
|
btc_blocksize = models.FloatField()
|
|
|
|
xmr_blocksize = models.FloatField()
|
|
|
|
btc_difficulty = models.FloatField()
|
|
|
|
xmr_difficulty = models.FloatField()
|
|
|
|
|
|
|
|
# Reddit charts
|
|
|
|
btc_subscriberCount = models.IntegerField()
|
|
|
|
btc_commentsPerHour = models.FloatField()
|
|
|
|
btc_postsPerHour = models.FloatField()
|
|
|
|
xmr_subscriberCount = models.IntegerField()
|
|
|
|
xmr_commentsPerHour = models.FloatField()
|
|
|
|
xmr_postsPerHour = models.FloatField()
|
|
|
|
crypto_subscriberCount = models.IntegerField()
|
|
|
|
crypto_commentsPerHour = models.FloatField()
|
|
|
|
crypto_postsPerHour = models.FloatField()
|
|
|
|
|
2022-06-05 18:36:57 +00:00
|
|
|
|
2022-08-08 19:05:59 +00:00
|
|
|
class P2Pool(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
date = models.DateField()
|
|
|
|
mini = models.BooleanField()
|
|
|
|
hashrate = models.IntegerField()
|
|
|
|
percentage = models.FloatField()
|
|
|
|
miners = models.IntegerField()
|
|
|
|
totalhashes = models.IntegerField()
|
|
|
|
totalblocksfound = models.IntegerField()
|
|
|
|
|
2022-08-14 03:27:05 +00:00
|
|
|
|
2022-12-25 17:59:02 +00:00
|
|
|
class Withdrawal(models.Model):
|
2024-11-12 13:09:33 +00:00
|
|
|
date = models.DateTimeField(auto_now_add=True)
|
|
|
|
state = models.BooleanField()
|