29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
from django.db import models, migrations
|
||
|
from django.conf import settings
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Team',
|
||
|
fields=[
|
||
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||
|
('name', models.CharField(max_length=255)),
|
||
|
('slug', models.SlugField(max_length=255, blank=True)),
|
||
|
('created', models.DateTimeField(auto_now_add=True)),
|
||
|
('modified', models.DateTimeField(auto_now=True)),
|
||
|
('members', models.ManyToManyField(related_name='member', to=settings.AUTH_USER_MODEL)),
|
||
|
('owner', models.ForeignKey(related_name='owner', to=settings.AUTH_USER_MODEL)),
|
||
|
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
|
||
|
],
|
||
|
),
|
||
|
]
|