from django.db import models


# Create your models here.
class ExamImage(models.Model):
    raw_name = models.CharField(max_length=150, null=True)
    subject_id = models.IntegerField()
    subject = models.CharField(max_length=20, default='unknown_subject')
    upload_date = models.DateField('保存日期')
    save_path = models.CharField(max_length=150, null=False)


class OcrToken(models.Model):
    update_time = models.DateTimeField('更新日期', auto_now=True)
    access_token = models.CharField(max_length=150, null=True)


class SheetBigBoxes(models.Model):
    update_time = models.DateTimeField('更新日期', auto_now=True)
    series_number = models.CharField(max_length=100, null=True)
    raw_name = models.CharField(max_length=100, null=True)
    small_box_path = models.CharField(max_length=100, null=True)

    subject_id = models.IntegerField(default=0)
    save_path = models.CharField(max_length=100, null=True)
    raw_big_box_path = models.CharField(max_length=100, null=True)
    subject = models.CharField(max_length=20, default='unknown_subject')


class SheetBoxes(models.Model):
    update_time = models.DateTimeField('更新日期', auto_now=True)
    paper_id = models.CharField(max_length=100, primary_key=True)
    raw_name = models.CharField(max_length=100, null=True)
    subject_id = models.IntegerField(default=0)
    subject = models.CharField(max_length=20, default='unknown_subject')

    save_path = models.CharField(max_length=100, null=True)
    xml_box_path = models.CharField(max_length=100, null=True)
    download_path = models.CharField(max_length=100, default='')
