# Generated by Django 3.2.12 on 2025-09-05 03:07

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):

    dependencies = [
        ('wf', '0002_alter_state_filter_dept'),
        ('system', '0006_auto_20241213_1249'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('ofm', '0001_initial'),
    ]

    operations = [
        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='{"seal_name": "印章名称"}', 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='创建人')),
                ('submit_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='seal_submit_user', 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,
            },
        ),
    ]
