first commit
This commit is contained in:
37
monitor/migrations/0002_marketanalysis.py
Normal file
37
monitor/migrations/0002_marketanalysis.py
Normal file
@@ -0,0 +1,37 @@
|
||||
# Generated by Django 6.0 on 2025-12-09 21:03
|
||||
|
||||
import django.core.validators
|
||||
from decimal import Decimal
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('monitor', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='MarketAnalysis',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||
('period', models.CharField(choices=[('hourly', 'Hourly'), ('daily', 'Daily'), ('weekly', 'Weekly'), ('yearly', 'Yearly')], default='hourly', max_length=10)),
|
||||
('current_price', models.DecimalField(decimal_places=2, max_digits=20)),
|
||||
('average_price', models.DecimalField(decimal_places=2, max_digits=20)),
|
||||
('min_price', models.DecimalField(decimal_places=2, max_digits=20)),
|
||||
('max_price', models.DecimalField(decimal_places=2, max_digits=20)),
|
||||
('status', models.CharField(choices=[('dip', 'Dip'), ('peak', 'Peak'), ('neutral', 'Neutral')], default='neutral', max_length=10)),
|
||||
('threshold_percent', models.DecimalField(decimal_places=2, default=15.0, max_digits=5, validators=[django.core.validators.MinValueValidator(Decimal('0.01')), django.core.validators.MaxValueValidator(Decimal('100'))])),
|
||||
('lower_threshold', models.DecimalField(decimal_places=2, max_digits=20)),
|
||||
('upper_threshold', models.DecimalField(decimal_places=2, max_digits=20)),
|
||||
('is_event', models.BooleanField(default=False)),
|
||||
('event_type', models.CharField(blank=True, choices=[('dip_below', 'Dip Below Threshold'), ('rise_above', 'Rise Above Threshold'), ('neutralized', 'Neutralized')], max_length=20)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Market Analyses',
|
||||
'ordering': ['-timestamp'],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user