# Generated by Django 3.2.12 on 2025-11-18 03:08

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('system', '0006_auto_20241213_1249'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('wf', '0005_workflow_cate'),
    ]

    operations = [
        migrations.CreateModel(
            name='Mroom',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('name', models.CharField(max_length=50, unique=True, verbose_name='会议室名称')),
                ('location', models.CharField(max_length=100, verbose_name='位置')),
                ('capacity', models.PositiveIntegerField(verbose_name='容纳人数')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mroom_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mroom_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MroomBooking',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('title', models.CharField(max_length=100, verbose_name='会议主题')),
                ('note', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('participant_count', models.PositiveIntegerField(default=0, verbose_name='参会人数')),
                ('key_participants', models.TextField(blank=True, null=True, verbose_name='主要参会领导')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mroombooking_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mroombooking_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('ticket', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mrooms_ticket', to='wf.ticket', verbose_name='关联会议室')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mroombooking_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='VehicleReg',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('name', models.CharField(max_length=50, verbose_name='车辆名称')),
                ('brand', models.CharField(blank=True, max_length=50, null=True, verbose_name='品牌')),
                ('plate', models.CharField(max_length=50, verbose_name='车牌号')),
                ('km', models.PositiveIntegerField(blank=True, null=True, verbose_name='行驶里程')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vehiclereg_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vehiclereg_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='VehicleUse',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('location', models.CharField(blank=True, max_length=100, null=True, verbose_name='出发地点')),
                ('via', models.CharField(blank=True, max_length=100, null=True, verbose_name='途经地点')),
                ('destination', models.CharField(blank=True, max_length=100, null=True, verbose_name='到达地点')),
                ('start_km', models.PositiveIntegerField(verbose_name='出发公里数')),
                ('end_km', models.PositiveIntegerField(blank=True, null=True, verbose_name='归还公里数')),
                ('actual_km', models.PositiveIntegerField(editable=False, verbose_name='实际行驶公里数')),
                ('is_city', models.BooleanField(default=True, verbose_name='是否市内用车')),
                ('reason', models.CharField(max_length=100, verbose_name='用车事由')),
                ('reception', models.CharField(blank=True, max_length=50, null=True, verbose_name='接待人')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vehicleuse_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vehicleuse_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('ticket', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vehicle_ticket', to='wf.ticket', verbose_name='关联工单')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='vehicleuse_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
                ('vehiclereg', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='vehicle_record', to='ofm.vehiclereg')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='VehicleSlot',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('vdate', models.DateField(db_index=True, verbose_name='使用日期')),
                ('slot', models.PositiveIntegerField(help_text='0-47', verbose_name='时段')),
                ('is_inuse', models.BooleanField(default=True, verbose_name='是否占用')),
                ('vehicle_use', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='slot_vehicle', to='ofm.vehicleuse')),
                ('vehreg', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='slot_record', to='ofm.vehiclereg')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Publicity',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('number', models.CharField(blank=True, max_length=50, null=True, verbose_name='记录编号')),
                ('title', models.CharField(max_length=100, verbose_name='送审稿件标题')),
                ('participants', models.CharField(max_length=50, verbose_name='所有撰稿人')),
                ('pub_dept', models.CharField(blank=True, max_length=50, null=True, verbose_name='部室/研究院')),
                ('pfile', models.CharField(blank=True, max_length=100, null=True, verbose_name='稿件路径')),
                ('level', models.JSONField(default=list, help_text="['重要', '一般', '非涉密']", verbose_name='涉密等级')),
                ('content', models.JSONField(default=list, help_text="['武器装备科研生产综合事项', '其它']", verbose_name='稿件内容涉及')),
                ('other_content', models.CharField(blank=True, max_length=100, null=True, verbose_name='其它内容')),
                ('report_purpose', models.CharField(blank=True, max_length=100, null=True, verbose_name='宣传报道目的')),
                ('channel', models.JSONField(default=list, help_text="['互联网', '信息平台', '官微', '公开发行物', '其它']", verbose_name='发布渠道')),
                ('other_channel', models.CharField(blank=True, max_length=50, null=True, verbose_name='其它渠道')),
                ('report_name', models.CharField(blank=True, max_length=50, null=True, verbose_name='报道名称')),
                ('review', models.JSONField(blank=True, default=list, help_text="['内容不涉及国家秘密和商业秘密，申请公开', '内容涉及国家秘密，申请按涉密渠道发布']", null=True, verbose_name='第一撰稿人自审')),
                ('dept_opinion', models.CharField(blank=True, max_length=100, null=True, verbose_name='部门负责人意见')),
                ('disposal_method', models.CharField(blank=True, max_length=50, null=True, verbose_name='处理方式')),
                ('secret_level', models.CharField(blank=True, max_length=50, null=True, verbose_name='秘密等级')),
                ('secret_period', models.CharField(blank=True, max_length=50, null=True, verbose_name='秘密期限')),
                ('dept_opinion_review', models.CharField(blank=True, max_length=100, null=True, verbose_name='部门审查意见')),
                ('publicity_opinion', models.CharField(blank=True, max_length=100, null=True, verbose_name='宣传报道意见')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='publicity_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='publicity_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('ticket', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='publicity_ticket', to='wf.ticket', verbose_name='关联工单')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='publicity_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MroomSlot',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('mdate', models.DateField(db_index=True, verbose_name='会议日期')),
                ('slot', models.PositiveIntegerField(help_text='0-47', verbose_name='时段')),
                ('is_inuse', models.BooleanField(default=True, verbose_name='是否占用')),
                ('booking', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='slot_b', to='ofm.mroombooking')),
                ('mroom', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='slot_m', to='ofm.mroom')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='LendingSeal',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('seal', models.JSONField(default=list, help_text='[公章，法人章，财务章，合同章，业务章，其他章]', verbose_name='印章信息')),
                ('seal_other', models.CharField(blank=True, max_length=50, null=True, verbose_name='其他印章')),
                ('filename', models.TextField(verbose_name='文件名称')),
                ('file', models.TextField(verbose_name='文件内容')),
                ('file_count', models.PositiveIntegerField(verbose_name='用印份数')),
                ('is_lending', models.BooleanField(default=False, verbose_name='是否借出')),
                ('contacts', models.CharField(blank=True, max_length=50, null=True, validators=[django.core.validators.RegexValidator('^1[3456789]\\d{9}$', '手机号码格式不正确')], verbose_name='联系方式')),
                ('lending_date', models.DateField(blank=True, null=True, verbose_name='借出日期')),
                ('return_date', models.DateField(blank=True, null=True, verbose_name='拟归还日期')),
                ('actual_return_date', models.DateField(blank=True, null=True, verbose_name='实际归还日期')),
                ('reason', models.CharField(blank=True, max_length=100, null=True, verbose_name='借用理由')),
                ('note', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='lendingseal_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='lendingseal_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('ticket', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='seal_ticket', to='wf.ticket', verbose_name='关联工单')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='lendingseal_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FileRecord',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('name', models.CharField(max_length=100, verbose_name='资料名称')),
                ('number', models.CharField(blank=True, max_length=50, null=True, verbose_name='档案编号')),
                ('counts', models.CharField(blank=True, max_length=10, null=True, verbose_name='文件份数')),
                ('location', models.CharField(blank=True, max_length=100, null=True, verbose_name='存放位置')),
                ('contacts', models.CharField(blank=True, max_length=50, null=True, validators=[django.core.validators.RegexValidator('^1[3456789]\\d{9}$', '手机号码格式不正确')], verbose_name='存档人电话')),
                ('reciver', models.CharField(blank=True, max_length=50, null=True, verbose_name='接收人（综合办）')),
                ('remark', models.TextField(blank=True, max_length=200, null=True, verbose_name='备注')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='filerecord_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='filerecord_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='filerecord_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BorrowRecord',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('borrow_date', models.DateField(blank=True, null=True, verbose_name='借阅日期')),
                ('return_date', models.DateField(blank=True, null=True, verbose_name='归还日期')),
                ('contacts', models.CharField(blank=True, max_length=50, null=True, validators=[django.core.validators.RegexValidator('^1[3456789]\\d{9}$', '手机号码格式不正确')], verbose_name='借阅人电话')),
                ('remark', models.JSONField(default=list, help_text="['借阅', '复印', '查阅']", verbose_name='用途')),
                ('belong_dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='borrowrecord_belong_dept', to='system.dept', verbose_name='所属部门')),
                ('borrow_file', models.ManyToManyField(related_name='borrow_records', to='ofm.FileRecord')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='borrowrecord_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('ticket', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='borrow_ticket', to='wf.ticket', verbose_name='关联工单')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='borrowrecord_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
