# Generated by Django 4.2.27 on 2026-02-19 00:03

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


class Migration(migrations.Migration):

    dependencies = [
        ("yonghu", "0023_alter_officialaccountuser_unionid"),
    ]

    operations = [
        migrations.CreateModel(
            name="UserKefu",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("nicheng", models.CharField(max_length=50, verbose_name="客服昵称")),
                ("erjimima", models.CharField(max_length=128, verbose_name="二级密码")),
                (
                    "zhuangtai",
                    models.IntegerField(
                        choices=[(0, "禁用"), (1, "正常")],
                        default=1,
                        verbose_name="客服状态",
                    ),
                ),
                (
                    "jinrichuli",
                    models.IntegerField(default=0, verbose_name="今日处理订单数"),
                ),
                (
                    "jinyuechuli",
                    models.IntegerField(default=0, verbose_name="本月处理订单数"),
                ),
                (
                    "zongchuli",
                    models.IntegerField(default=0, verbose_name="累计处理订单数"),
                ),
                (
                    "create_time",
                    models.DateTimeField(auto_now_add=True, verbose_name="创建时间"),
                ),
                (
                    "update_time",
                    models.DateTimeField(auto_now=True, verbose_name="更新时间"),
                ),
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="kefu_profile",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="关联用户",
                    ),
                ),
            ],
            options={
                "verbose_name": "客服扩展表",
                "verbose_name_plural": "客服扩展表",
                "db_table": "user_kefu",
                "indexes": [
                    models.Index(fields=["user"], name="user_kefu_user_id_5fe3a1_idx"),
                    models.Index(
                        fields=["zhuangtai"], name="user_kefu_zhuangt_317491_idx"
                    ),
                ],
            },
        ),
    ]
