# Generated by Django 6.0 on 2025-12-20 23:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Dingdan",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "dingdan_id",
                    models.CharField(max_length=32, unique=True, verbose_name="订单ID"),
                ),
                (
                    "zhuangtai",
                    models.IntegerField(
                        blank=True, default=1, null=True, verbose_name="订单状态"
                    ),
                ),
                (
                    "fadan_pingtai",
                    models.IntegerField(blank=True, null=True, verbose_name="发单平台"),
                ),
                (
                    "jine",
                    models.DecimalField(
                        blank=True,
                        decimal_places=2,
                        max_digits=10,
                        null=True,
                        verbose_name="订单金额",
                    ),
                ),
                (
                    "dashou_fencheng",
                    models.DecimalField(
                        blank=True,
                        decimal_places=2,
                        max_digits=10,
                        null=True,
                        verbose_name="打手分成",
                    ),
                ),
                (
                    "jiedan_dashou_id",
                    models.CharField(
                        blank=True, max_length=32, null=True, verbose_name="接单打手ID"
                    ),
                ),
                (
                    "zhiding_id",
                    models.CharField(
                        blank=True, max_length=32, null=True, verbose_name="指定ID"
                    ),
                ),
                (
                    "shangpin_id",
                    models.IntegerField(blank=True, null=True, verbose_name="商品ID"),
                ),
                (
                    "jieshao",
                    models.TextField(blank=True, null=True, verbose_name="订单介绍"),
                ),
                (
                    "beizhu",
                    models.TextField(blank=True, null=True, verbose_name="订单备注"),
                ),
                (
                    "create_time",
                    models.DateTimeField(auto_now_add=True, verbose_name="创建时间"),
                ),
                (
                    "update_time",
                    models.DateTimeField(auto_now=True, verbose_name="更新时间"),
                ),
            ],
            options={
                "verbose_name": "订单",
                "verbose_name_plural": "订单",
                "db_table": "dingdan",
                "indexes": [
                    models.Index(
                        fields=["zhuangtai"], name="dingdan_zhuangt_2febe8_idx"
                    ),
                    models.Index(
                        fields=["dingdan_id"], name="dingdan_dingdan_83dcb6_idx"
                    ),
                    models.Index(
                        fields=["jiedan_dashou_id"], name="dingdan_jiedan__921bfa_idx"
                    ),
                ],
            },
        ),
        migrations.CreateModel(
            name="DingdanPingtai",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "laoban_id",
                    models.CharField(
                        blank=True, max_length=32, null=True, verbose_name="老板ID"
                    ),
                ),
                (
                    "laoban_pingjia",
                    models.TextField(blank=True, null=True, verbose_name="老板评价"),
                ),
                (
                    "dingdan",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="pingtai_kuozhan",
                        to="dingdan.dingdan",
                        verbose_name="订单",
                    ),
                ),
            ],
            options={
                "verbose_name": "平台订单扩展",
                "verbose_name_plural": "平台订单扩展",
                "db_table": "dingdan_pingtai",
            },
        ),
        migrations.CreateModel(
            name="DingdanShangjia",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "shangjia_id",
                    models.CharField(
                        blank=True, max_length=32, null=True, verbose_name="商家ID"
                    ),
                ),
                (
                    "shangjia_pingjia",
                    models.TextField(blank=True, null=True, verbose_name="商家评价"),
                ),
                (
                    "dingdan",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="shangjia_kuozhan",
                        to="dingdan.dingdan",
                        verbose_name="订单",
                    ),
                ),
            ],
            options={
                "verbose_name": "商家订单扩展",
                "verbose_name_plural": "商家订单扩展",
                "db_table": "dingdan_shangjia",
            },
        ),
    ]
