<reponame>bizeasy17/investtrack
# Generated by Django 3.0.2 on 2020-09-06 01:56

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('tradeaccounts', '0063_auto_20200628_1551'),
    ]

    operations = [
        migrations.AddField(
            model_name='positions',
            name='target_chg_pct',
            field=models.DecimalField(blank=True, decimal_places=2, default=20, max_digits=5, null=True, verbose_name='目标涨幅%'),
        ),
        migrations.AlterField(
            model_name='tradeaccountsnapshot',
            name='applied_period',
            field=models.CharField(blank=True, choices=[('w', '周'), ('d', '日'), ('m', '月')], default='d', max_length=1, verbose_name='收益周期'),
        ),
        migrations.CreateModel(
            name='StockPositionSnapshot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stock_name', models.CharField(max_length=50, verbose_name='股票名称')),
                ('stock_code', models.CharField(max_length=50, verbose_name='股票代码')),
                ('profit', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='利润')),
                ('profit_chg', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='利润变化')),
                ('profit_ratio', models.DecimalField(decimal_places=5, default=0, max_digits=10, verbose_name='利润率')),
                ('target_chg_pct', models.DecimalField(decimal_places=5, default=0, max_digits=10, verbose_name='目标利润率')),
                ('snap_date', models.DateField(default=django.utils.timezone.now, verbose_name='快照时间')),
                ('applied_period', models.CharField(blank=True, choices=[('w', '周'), ('d', '日'), ('m', '月')], default='d', max_length=1, verbose_name='收益周期')),
                ('trade_account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tradeaccounts.TradeAccount', verbose_name='股票账户')),
                ('trader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='持仓人')),
            ],
        ),
    ]

# Generated by Django 3.0.2 on 2020-09-06 01:56

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('tradeaccounts', '0063_auto_20200628_1551'),
    ]

    operations = [
        migrations.AddField(
            model_name='positions',
            name='target_chg_pct',
            field=models.DecimalField(blank=True, decimal_places=2, default=20, max_digits=5, null=True, verbose_name='目标涨幅%'),
        ),
        migrations.AlterField(
            model_name='tradeaccountsnapshot',
            name='applied_period',
            field=models.CharField(blank=True, choices=[('w', '周'), ('d', '日'), ('m', '月')], default='d', max_length=1, verbose_name='收益周期'),
        ),
        migrations.CreateModel(
            name='StockPositionSnapshot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stock_name', models.CharField(max_length=50, verbose_name='股票名称')),
                ('stock_code', models.CharField(max_length=50, verbose_name='股票代码')),
                ('profit', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='利润')),
                ('profit_chg', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='利润变化')),
                ('profit_ratio', models.DecimalField(decimal_places=5, default=0, max_digits=10, verbose_name='利润率')),
                ('target_chg_pct', models.DecimalField(decimal_places=5, default=0, max_digits=10, verbose_name='目标利润率')),
                ('snap_date', models.DateField(default=django.utils.timezone.now, verbose_name='快照时间')),
                ('applied_period', models.CharField(blank=True, choices=[('w', '周'), ('d', '日'), ('m', '月')], default='d', max_length=1, verbose_name='收益周期')),
                ('trade_account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tradeaccounts.TradeAccount', verbose_name='股票账户')),
                ('trader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='持仓人')),
            ],
        ),
    ]
# Generated by Django 3.0.2 on 2020-09-06 01:56