You've already forked opc-backend
开发了权限控制接口:实现了通过数据库分配菜单权限节点,控制接口访问安全。 开发了实名认证中心:实现了个人身份证信息与企业营业执照的提交与审核接口。 开发了任务与协作大厅核心业务:实现了任务的发布、接单、状态流转以及专家邀约接口。 配置了全局环境变量与数据库引擎:集成了 PostgreSQL 数据库、Redis 缓存与 MinIO 对象存储。
67 lines
3.6 KiB
Python
67 lines
3.6 KiB
Python
# Generated by Django 4.2.30 on 2026-04-25 09:46
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ReservationResource',
|
|
fields=[
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('name', models.CharField(max_length=128)),
|
|
('type', models.CharField(choices=[('ACCESS_CONTROL', '门禁通行'), ('MEETING_ROOM', '会议室')], max_length=32)),
|
|
('description', models.TextField(blank=True, null=True)),
|
|
('capacity', models.IntegerField(blank=True, null=True)),
|
|
('location', models.CharField(blank=True, max_length=256, null=True)),
|
|
('cover_url', models.CharField(blank=True, max_length=512, null=True)),
|
|
('price_per_unit', models.DecimalField(decimal_places=2, default=0.0, max_digits=8)),
|
|
('price_unit', models.CharField(default='次', max_length=32)),
|
|
('is_active', models.BooleanField(default=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
'db_table': 'reservation_resources',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ReservationOrder',
|
|
fields=[
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('order_no', models.CharField(max_length=64, unique=True)),
|
|
('start_time', models.DateTimeField()),
|
|
('end_time', models.DateTimeField()),
|
|
('quantity', models.IntegerField(default=1)),
|
|
('unit_price', models.DecimalField(decimal_places=2, max_digits=8)),
|
|
('total_amount', models.DecimalField(decimal_places=2, max_digits=10)),
|
|
('status', models.CharField(choices=[('PENDING_PAY', '待支付'), ('PAID', '已支付'), ('USED', '已使用'), ('REFUNDED', '已退款'), ('CANCELLED', '已取消')], default='PENDING_PAY', max_length=32)),
|
|
('wx_prepay_id', models.CharField(blank=True, max_length=128, null=True)),
|
|
('wx_transaction_id', models.CharField(blank=True, max_length=128, null=True)),
|
|
('paid_at', models.DateTimeField(blank=True, null=True)),
|
|
('refund_reason', models.TextField(blank=True, null=True)),
|
|
('refund_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
|
('wx_refund_id', models.CharField(blank=True, max_length=128, null=True)),
|
|
('refunded_at', models.DateTimeField(blank=True, null=True)),
|
|
('qr_code_url', models.CharField(blank=True, max_length=512, null=True)),
|
|
('verified_at', models.DateTimeField(blank=True, null=True)),
|
|
('remark', models.TextField(blank=True, null=True)),
|
|
('is_deleted', models.BooleanField(default=False)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='orders', to='reservations.reservationresource')),
|
|
],
|
|
options={
|
|
'db_table': 'reservation_orders',
|
|
},
|
|
),
|
|
]
|