text: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.5 on 2017-11-15 15:19
  from __future__ import unicode_literals
  
  import annoying.fields
  import datetime
  from django.conf import settings
  import django.core.validators
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Pet',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('petType', models.CharField(choices=[('Ch\xf3', 'Dog'), ('M\xe8o', 'Cat')], max_length=10)),
                  ('petName', models.CharField(max_length=100)),
                  ('petCode', models.CharField(max_length=20, unique=True)),
                  ('petHistory', models.TextField(blank=True, null=True)),
                  ('petAppearance', models.TextField(blank=True, null=True)),
                  ('petHabit', models.TextField(blank=True, null=True)),
                  ('lifeSpan_min', models.IntegerField(default=10, validators=[django.core.validators.MaxValueValidator(50), django.core.validators.MinValueValidator(1)])),
                  ('lifeSpan_max', models.IntegerField(default=5, validators=[django.core.validators.MaxValueValidator(50), django.core.validators.MinValueValidator(1)])),
                  ('others', models.TextField(blank=True, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='PetGallery',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('image', models.ImageField(upload_to='gallery/')),
                  ('timeCreate', models.DateTimeField(auto_now_add=True)),
                  ('pet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pet.Pet')),
              ],
          ),
          migrations.CreateModel(
              name='Purchase',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('available', models.BooleanField(default=True)),
                  ('timeCreate', models.DateTimeField(auto_now_add=True)),
                  ('price', models.FloatField(default=0)),
                  ('image', models.ImageField(default='upload/non-im.jpg', upload_to='upload/')),
                  ('description', models.TextField(blank=True, null=True)),
                  ('phone', models.CharField(blank=True, max_length=30, null=True)),
              ],
              options={
                  'ordering': ('timeCreate', 'price', 'available'),
              },
          ),
          migrations.CreateModel(
              name='UserProfile',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('avatar', models.ImageField(default='user_avatars/default-avatar.jpg', upload_to='user_avatars')),
                  ('gender', models.CharField(choices=[('Nam', 'Male'), ('N\u1eef', 'Female')], max_length=10)),
                  ('dateOfBirth', models.DateField(default=datetime.date.today)),
                  ('favorite_pet', models.ManyToManyField(blank=True, related_name='followers', to='pet.Pet')),
                  ('follows', models.ManyToManyField(blank=True, related_name='followers', to='pet.UserProfile')),
                  ('user', annoying.fields.AutoOneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.AddField(
              model_name='purchase',
              name='owner',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='purchases', to='pet.UserProfile'),
          ),
          migrations.AddField(
              model_name='purchase',
              name='pet',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pet.Pet'),
          ),
          migrations.AddField(
              model_name='purchase',
              name='subscribers',
              field=models.ManyToManyField(blank=True, related_name='subscribers', to='pet.UserProfile'),
          ),
      ]
  