# Generated by Django 4.2.29 on 2026-03-15 11:04

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0002_remove_user_daily_limit_remove_user_monthly_limit_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='团队名称')),
                ('total_seconds_pool', models.BigIntegerField(default=0, verbose_name='总额度池(秒)')),
                ('total_seconds_used', models.FloatField(default=0, verbose_name='已消耗总秒数')),
                ('monthly_seconds_limit', models.IntegerField(default=6000, verbose_name='每月消费上限(秒)')),
                ('daily_member_limit_default', models.IntegerField(default=600, verbose_name='新成员默认每日限额(秒)')),
                ('is_active', models.BooleanField(default=True, verbose_name='启用状态')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
            ],
            options={
                'verbose_name': '团队',
                'verbose_name_plural': '团队',
            },
        ),
        migrations.AddField(
            model_name='user',
            name='is_team_admin',
            field=models.BooleanField(default=False, verbose_name='团队管理员'),
        ),
        migrations.AddField(
            model_name='user',
            name='team',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='members', to='accounts.team', verbose_name='所属团队'),
        ),
    ]
