# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-09-04 14:21
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import iran_list.products.models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('products', '0019_version_employees_count'),
    ]

    operations = [
        migrations.CreateModel(
            name='Investment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('pen', 'Pending'), ('ver', 'Verified'), ('rej', 'Rejected')], default='pen', max_length=3, verbose_name='Status')),
                ('amount', models.PositiveIntegerField(verbose_name='Investment Amount')),
                ('investor_name', models.CharField(max_length=511, verbose_name='Investor name')),
                ('text', models.TextField(verbose_name='Text')),
                ('year', models.PositiveSmallIntegerField(verbose_name='Investment Year')),
                ('month', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Investment Month')),
                ('link', models.URLField(blank=True, null=True, verbose_name='Link')),
                ('document', models.ImageField(blank=True, null=True, upload_to='investments/docs', verbose_name='Document')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('invested_on', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='investments_received', to='products.Product', verbose_name='Invested On')),
                ('investor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='investments_done', to='products.Product', verbose_name='Investor')),
                ('user', models.ForeignKey(on_delete=models.SET(iran_list.products.models.get_sentinel_user), related_name='added_investments', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'Investment',
                'verbose_name_plural': 'Investments',
            },
        ),
    ]
