59 lines
2.1 KiB
Python
59 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import models, migrations
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='MarkovContext',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('name', models.CharField(unique=True, max_length=64)),
|
|
],
|
|
options={
|
|
},
|
|
bases=(models.Model,),
|
|
),
|
|
migrations.CreateModel(
|
|
name='MarkovState',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('k1', models.CharField(max_length=128)),
|
|
('k2', models.CharField(max_length=128)),
|
|
('v', models.CharField(max_length=128)),
|
|
('count', models.IntegerField(default=0)),
|
|
('context', models.ForeignKey(to='markov.MarkovContext')),
|
|
],
|
|
options={
|
|
'permissions': set([('teach_line', 'Can teach lines'), ('import_log_file', 'Can import states from a log file')]),
|
|
},
|
|
bases=(models.Model,),
|
|
),
|
|
migrations.CreateModel(
|
|
name='MarkovTarget',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('name', models.CharField(unique=True, max_length=64)),
|
|
('chatter_chance', models.IntegerField(default=0)),
|
|
('context', models.ForeignKey(to='markov.MarkovContext')),
|
|
],
|
|
options={
|
|
},
|
|
bases=(models.Model,),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='markovstate',
|
|
unique_together=set([('context', 'k1', 'k2', 'v')]),
|
|
),
|
|
migrations.AlterIndexTogether(
|
|
name='markovstate',
|
|
index_together=set([('context', 'k1', 'k2'), ('context', 'v')]),
|
|
),
|
|
]
|