Skip to content

Commit 987dabb

Browse files
committed
Added an initial migration for messages.
- Legacy-Id: 11255
1 parent a32d786 commit 987dabb

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import models, migrations
5+
import datetime
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('person', '0001_initial'),
12+
('doc', '0001_initial'),
13+
('group', '0001_initial'),
14+
]
15+
16+
operations = [
17+
migrations.CreateModel(
18+
name='Message',
19+
fields=[
20+
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
21+
('time', models.DateTimeField(default=datetime.datetime.now)),
22+
('subject', models.CharField(max_length=255)),
23+
('frm', models.CharField(max_length=255)),
24+
('to', models.CharField(max_length=1024)),
25+
('cc', models.CharField(max_length=1024, blank=True)),
26+
('bcc', models.CharField(max_length=255, blank=True)),
27+
('reply_to', models.CharField(max_length=255, blank=True)),
28+
('body', models.TextField()),
29+
('content_type', models.CharField(default=b'text/plain', max_length=255, blank=True)),
30+
('by', models.ForeignKey(to='person.Person')),
31+
('related_docs', models.ManyToManyField(to='doc.Document', blank=True)),
32+
('related_groups', models.ManyToManyField(to='group.Group', blank=True)),
33+
],
34+
options={
35+
'ordering': ['time'],
36+
},
37+
bases=(models.Model,),
38+
),
39+
migrations.CreateModel(
40+
name='SendQueue',
41+
fields=[
42+
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
43+
('time', models.DateTimeField(default=datetime.datetime.now)),
44+
('send_at', models.DateTimeField(null=True, blank=True)),
45+
('sent_at', models.DateTimeField(null=True, blank=True)),
46+
('note', models.TextField(blank=True)),
47+
('by', models.ForeignKey(to='person.Person')),
48+
('message', models.ForeignKey(to='message.Message')),
49+
],
50+
options={
51+
'ordering': ['time'],
52+
},
53+
bases=(models.Model,),
54+
),
55+
]

0 commit comments

Comments
 (0)