# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-09-15 13:00
from __future__ import unicode_literals

import ckeditor.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import waves.wcore.models.base


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='DemoWavesService',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, help_text='Creation timestamp', verbose_name='Created on')),
                ('updated', models.DateTimeField(auto_now=True, help_text='Last update timestamp', verbose_name='Last Update')),
                ('description', ckeditor.fields.RichTextField(blank=True, help_text='Description (HTML)', null=True, verbose_name='Description')),
                ('short_description', models.TextField(blank=True, help_text='Short description (Text)', null=True, verbose_name='Short Description')),
                ('api_name', models.CharField(blank=True, help_text='Api short code, must be unique, leave blank for automatic setup', max_length=100, null=True)),
                ('name', models.CharField(help_text='Service displayed name', max_length=255, verbose_name='Service name')),
                ('version', models.CharField(blank=True, default='1.0', help_text='Service displayed version', max_length=10, null=True, verbose_name='Current version')),
                ('status', models.IntegerField(choices=[[0, 'Draft'], [1, 'Test'], [2, 'Restricted'], [3, 'Public']], default=0, help_text='Service online status')),
                ('api_on', models.BooleanField(default=True, help_text='Service is available for wapi:api_v2 calls', verbose_name='Available on API')),
                ('web_on', models.BooleanField(default=True, help_text='Service is available for web front', verbose_name='Available on WEB')),
                ('email_on', models.BooleanField(default=True, help_text='This service sends notification email', verbose_name='Notify results')),
                ('partial', models.BooleanField(default=False, help_text='Set whether some service outputs are dynamic (not known in advance)', verbose_name='Dynamic outputs')),
                ('remote_service_id', models.CharField(editable=False, max_length=255, null=True, verbose_name='Remote service tool ID')),
                ('edam_topics', models.TextField(blank=True, help_text='Comma separated list of Edam ontology topics', null=True, verbose_name='Edam topics')),
                ('edam_operations', models.TextField(blank=True, help_text='Comma separated list of Edam ontology operations', null=True, verbose_name='Edam operations')),
            ],
            options={
                'abstract': False,
            },
            bases=(waves.wcore.models.base.ExportAbleMixin, models.Model),
        ),
        migrations.CreateModel(
            name='ServiceCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.PositiveIntegerField(default=0)),
                ('description', ckeditor.fields.RichTextField(blank=True, help_text='Description (HTML)', null=True, verbose_name='Description')),
                ('short_description', models.TextField(blank=True, help_text='Short description (Text)', null=True, verbose_name='Short Description')),
                ('name', models.CharField(help_text='Category name', max_length=255, verbose_name='Category Name')),
                ('ref', models.URLField(blank=True, help_text='Category online reference', null=True, verbose_name='Reference')),
                ('parent', models.ForeignKey(blank=True, help_text='Parent category', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children_category', to='demo.ServiceCategory')),
            ],
            options={
                'ordering': ['name'],
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='ServiceMeta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.PositiveIntegerField(default=0)),
                ('description', ckeditor.fields.RichTextField(blank=True, help_text='Description (HTML)', null=True, verbose_name='Description')),
                ('short_description', models.TextField(blank=True, help_text='Short description (Text)', null=True, verbose_name='Short Description')),
                ('type', models.CharField(choices=[('cite', 'Citation'), ('cmd', 'Command line'), ('doc', 'Documentation'), ('download', 'Downloads'), ('feat', 'Features'), ('misc', 'Miscellaneous'), ('website', 'Online resources'), ('paper', 'Related Paper'), ('rtfm', 'User Guide')], max_length=100, verbose_name='Meta type')),
                ('title', models.CharField(blank=True, max_length=255, null=True, verbose_name='Title')),
                ('value', models.CharField(blank=True, max_length=500, null=True, verbose_name='Link')),
                ('is_url', models.BooleanField(default=False, editable=False, verbose_name='Is a url')),
                ('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='metas', to=settings.WCORE_SERVICE_MODEL)),
            ],
            options={
                'verbose_name': 'Service links',
                'verbose_name_plural': 'Service links',
            },
        ),
    ]
