# Generated by Django 3.1.5 on 2021-01-20 13:58

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Stock',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.IntegerField(verbose_name='Stock Code')),
                ('name', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Weekday',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(blank=True, null=True, verbose_name='Date')),
                ('holiday', models.BooleanField(default=False, verbose_name='Holiday')),
            ],
        ),
        migrations.CreateModel(
            name='Stockholding',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(db_index=True, verbose_name='Date')),
                ('participant_id', models.CharField(blank=True, db_index=True, max_length=20, verbose_name='Participant ID')),
                ('name', models.CharField(blank=True, max_length=200, null=True, verbose_name='Name')),
                ('address', models.TextField(blank=True, null=True, verbose_name='Address')),
                ('share', models.BigIntegerField(default=0, verbose_name='Shareholding')),
                ('share_percent', models.FloatField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)], verbose_name='Percent of total issued number')),
                ('total_shares', models.BigIntegerField(default=0, verbose_name='Total Shares')),
                ('daily_diff', models.FloatField(blank=True, null=True, verbose_name='Daily Change')),
                ('daily_percent_diff', models.FloatField(blank=True, null=True, verbose_name='Daily Change(%)')),
                ('stock', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stock.stock', verbose_name='Stock')),
            ],
        ),
    ]
