# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
#   * Rearrange models' order
#   * Make sure each model has one field with primary_key=True
#   * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
#   * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models


class Data13178079(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    avg = models.FloatField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    rgrade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    r_type = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    p1 = models.FloatField(blank=True, null=True)
    p2 = models.FloatField(blank=True, null=True)
    p3 = models.FloatField(blank=True, null=True)
    p4 = models.FloatField(blank=True, null=True)
    p5 = models.FloatField(blank=True, null=True)
    p6 = models.FloatField(blank=True, null=True)
    p7 = models.FloatField(blank=True, null=True)
    p8 = models.FloatField(blank=True, null=True)
    p9 = models.FloatField(blank=True, null=True)
    p10 = models.FloatField(blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    ndata = models.IntegerField(blank=True, null=True)
    sub_order = models.IntegerField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    header = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'Data_131_78079'
        app_label = "legacy"


class Lotsizeorder(models.Model):
    oid = models.AutoField(primary_key=True)
    lotno = models.CharField(max_length=100, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    sizes = models.CharField(max_length=400, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'LotSizeOrder'
        app_label = "legacy"


class Lottracking(models.Model):
    lotno = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machineid = models.ForeignKey('MachinesWb', models.DO_NOTHING, db_column='machineId', blank=True, null=True)  # Field name made lowercase.
    machinegroup = models.CharField(db_column='machineGroup', max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    mgid = models.ForeignKey('Machinegroup', models.DO_NOTHING, db_column='mgId', blank=True, null=True)  # Field name made lowercase.
    datams_id = models.IntegerField(blank=True, null=True)
    datawb = models.ForeignKey('DataWb', models.DO_NOTHING, blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'LotTracking'
        app_label = "legacy"


class Agreements(models.Model):
    title = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    file = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    description = models.TextField(db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'agreements'
        app_label = "legacy"


class DailyChecks(models.Model):
    p1 = models.FloatField(blank=True, null=True)
    p2 = models.FloatField(blank=True, null=True)
    p3 = models.FloatField(blank=True, null=True)
    avg = models.FloatField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    header = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    user_id = models.IntegerField(blank=True, null=True)
    empid = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    shift = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    result = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'daily_checks'
        app_label = "legacy"


class DailyChecksWb(models.Model):
    result = models.FloatField(blank=True, null=True)
    weight = models.FloatField(blank=True, null=True)
    judgement = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    user_id = models.IntegerField(blank=True, null=True)
    empid = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    shift = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'daily_checks_wb'
        app_label = "legacy"


class Data(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    r_type = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    p1 = models.FloatField(blank=True, null=True)
    p2 = models.FloatField(blank=True, null=True)
    p3 = models.FloatField(blank=True, null=True)
    p4 = models.FloatField(blank=True, null=True)
    p5 = models.FloatField(blank=True, null=True)
    p6 = models.FloatField(blank=True, null=True)
    p7 = models.FloatField(blank=True, null=True)
    p8 = models.FloatField(blank=True, null=True)
    p9 = models.FloatField(blank=True, null=True)
    p10 = models.FloatField(blank=True, null=True)
    avg = models.FloatField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    rgrade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    header = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    ndata = models.IntegerField(blank=True, null=True)
    sub_order = models.IntegerField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data'
        app_label = "legacy"

    def __str__(self):
        return f"Lotno:{self.lot_no} Code:{self.code}"


class Data20082018(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    avg = models.FloatField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    rgrade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    r_type = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    p1 = models.FloatField(blank=True, null=True)
    p2 = models.FloatField(blank=True, null=True)
    p3 = models.FloatField(blank=True, null=True)
    p4 = models.FloatField(blank=True, null=True)
    p5 = models.FloatField(blank=True, null=True)
    p6 = models.FloatField(blank=True, null=True)
    p7 = models.FloatField(blank=True, null=True)
    p8 = models.FloatField(blank=True, null=True)
    p9 = models.FloatField(blank=True, null=True)
    p10 = models.FloatField(blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    ndata = models.IntegerField(blank=True, null=True)
    sub_order = models.IntegerField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    header = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data (2008-2018)'
        app_label = "legacy"


class Data25113027G(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    avg = models.FloatField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    rgrade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    r_type = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    p1 = models.FloatField(blank=True, null=True)
    p2 = models.FloatField(blank=True, null=True)
    p3 = models.FloatField(blank=True, null=True)
    p4 = models.FloatField(blank=True, null=True)
    p5 = models.FloatField(blank=True, null=True)
    p6 = models.FloatField(blank=True, null=True)
    p7 = models.FloatField(blank=True, null=True)
    p8 = models.FloatField(blank=True, null=True)
    p9 = models.FloatField(blank=True, null=True)
    p10 = models.FloatField(blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    ndata = models.IntegerField(blank=True, null=True)
    sub_order = models.IntegerField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    header = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data_251-13027G'
        app_label = "legacy"


class DataMs(models.Model):
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machine_id = models.IntegerField()
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    row_no = models.IntegerField()
    dsize = models.FloatField(blank=True, null=True)
    tsize = models.FloatField(blank=True, null=True)
    hsize = models.FloatField(blank=True, null=True)
    csize = models.FloatField(blank=True, null=True)
    esize = models.FloatField(blank=True, null=True)
    fsize = models.FloatField(blank=True, null=True)
    gsize = models.FloatField(blank=True, null=True)
    psize = models.FloatField(blank=True, null=True)
    wsize = models.FloatField(blank=True, null=True)
    jksize = models.FloatField(blank=True, null=True)
    usize = models.FloatField(blank=True, null=True)
    msize = models.FloatField(blank=True, null=True)
    asize = models.FloatField(blank=True, null=True)
    nsize = models.FloatField(blank=True, null=True)
    jsize = models.FloatField(blank=True, null=True)
    xsize = models.FloatField(blank=True, null=True)
    flatnesssize = models.FloatField(blank=True, null=True)
    ksize = models.FloatField(blank=True, null=True)
    thicknesssize = models.FloatField(blank=True, null=True)
    qsize = models.FloatField(blank=True, null=True)
    ssize = models.FloatField(blank=True, null=True)
    dsizeok = models.CharField(db_column='dsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    tsizeok = models.CharField(db_column='tsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    hsizeok = models.CharField(db_column='hsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    csizeok = models.CharField(db_column='csizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    esizeok = models.CharField(db_column='esizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    fsizeok = models.CharField(db_column='fsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    gsizeok = models.CharField(db_column='gsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    psizeok = models.CharField(db_column='psizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    wsizeok = models.CharField(db_column='wsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    jksizeok = models.CharField(db_column='jksizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    usizeok = models.CharField(db_column='usizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    msizeok = models.CharField(db_column='msizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    asizeok = models.CharField(db_column='asizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    nsizeok = models.CharField(db_column='nsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    jsizeok = models.CharField(db_column='jsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    xsizeok = models.CharField(db_column='xsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    flatnesssizeok = models.CharField(db_column='flatnesssizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    ksizeok = models.CharField(db_column='ksizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    thicknesssizeok = models.CharField(db_column='thicknesssizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    qsizeok = models.CharField(db_column='qsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    ssizeok = models.CharField(db_column='ssizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    emp_id = models.IntegerField()
    weight = models.FloatField(blank=True, null=True)
    devid = models.CharField(max_length=40, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint1 = models.FloatField(blank=True, null=True)
    tpoint2 = models.FloatField(blank=True, null=True)
    tpoint3 = models.FloatField(blank=True, null=True)
    tpoint4 = models.FloatField(blank=True, null=True)
    tpoint1ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint2ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint3ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint4ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tdiff = models.FloatField(blank=True, null=True)
    tmin = models.FloatField(blank=True, null=True)
    tmax = models.FloatField(blank=True, null=True)
    hdev = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    hsizeproxy = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    restricts = models.CharField(max_length=40, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    shift = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    mode = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    cal_mode = models.IntegerField(blank=True, null=True)
    diasize = models.FloatField(blank=True, null=True)
    diasizeok = models.CharField(db_column='diasizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    censize = models.FloatField(blank=True, null=True)
    censizeok = models.CharField(db_column='censizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    osize = models.FloatField(blank=True, null=True)
    osizeok = models.CharField(db_column='osizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size1 = models.FloatField(blank=True, null=True)
    size2 = models.FloatField(blank=True, null=True)
    size1ok = models.CharField(db_column='size1Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size2ok = models.CharField(db_column='size2Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size1name = models.CharField(db_column='size1Name', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size2name = models.CharField(db_column='size2Name', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    bsize = models.FloatField(blank=True, null=True)
    bsizeok = models.CharField(db_column='bsizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    lsize = models.FloatField(blank=True, null=True)
    lsizeok = models.CharField(db_column='lsizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    zsize = models.FloatField(blank=True, null=True)
    zsizeok = models.CharField(db_column='zsizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    x1size = models.FloatField(blank=True, null=True)
    x1sizeok = models.CharField(db_column='x1sizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    x2size = models.FloatField(blank=True, null=True)
    x2sizeok = models.CharField(db_column='x2sizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    tpresssize = models.FloatField(blank=True, null=True)
    tpresssizeok = models.CharField(db_column='tpresssizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t1 = models.FloatField()
    t2 = models.FloatField()
    t3 = models.FloatField()
    t4 = models.FloatField()
    t1ok = models.CharField(db_column='t1Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t2ok = models.CharField(db_column='t2Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t3ok = models.CharField(db_column='t3Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t4ok = models.CharField(db_column='t4Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t4avg = models.FloatField()
    tpok = models.CharField(db_column='tpOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t4min = models.FloatField(blank=True, null=True)
    t4max = models.FloatField(blank=True, null=True)
    t4diff = models.FloatField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data_ms'
        app_label = "legacy"

    def __str__(self):
        return f"Lotno:{self.lot_no} Code:{self.code}"

class DataMsLot2210062522(models.Model):
    row_no = models.IntegerField()
    dsize = models.FloatField(blank=True, null=True)
    tsize = models.FloatField(blank=True, null=True)
    hsize = models.FloatField(blank=True, null=True)
    csize = models.FloatField(blank=True, null=True)
    esize = models.FloatField(blank=True, null=True)
    fsize = models.FloatField(blank=True, null=True)
    gsize = models.FloatField(blank=True, null=True)
    psize = models.FloatField(blank=True, null=True)
    wsize = models.FloatField(blank=True, null=True)
    jksize = models.FloatField(blank=True, null=True)
    usize = models.FloatField(blank=True, null=True)
    msize = models.FloatField(blank=True, null=True)
    asize = models.FloatField(blank=True, null=True)
    nsize = models.FloatField(blank=True, null=True)
    jsize = models.FloatField(blank=True, null=True)
    xsize = models.FloatField(blank=True, null=True)
    flatnesssize = models.FloatField(blank=True, null=True)
    ksize = models.FloatField(blank=True, null=True)
    thicknesssize = models.FloatField(blank=True, null=True)
    qsize = models.FloatField(blank=True, null=True)
    ssize = models.FloatField(blank=True, null=True)
    dsizeok = models.CharField(db_column='dsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    tsizeok = models.CharField(db_column='tsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    hsizeok = models.CharField(db_column='hsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    csizeok = models.CharField(db_column='csizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    esizeok = models.CharField(db_column='esizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    fsizeok = models.CharField(db_column='fsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    gsizeok = models.CharField(db_column='gsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    psizeok = models.CharField(db_column='psizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    wsizeok = models.CharField(db_column='wsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    jksizeok = models.CharField(db_column='jksizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    usizeok = models.CharField(db_column='usizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    msizeok = models.CharField(db_column='msizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    asizeok = models.CharField(db_column='asizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    nsizeok = models.CharField(db_column='nsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    jsizeok = models.CharField(db_column='jsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    xsizeok = models.CharField(db_column='xsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    flatnesssizeok = models.CharField(db_column='flatnesssizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    ksizeok = models.CharField(db_column='ksizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    thicknesssizeok = models.CharField(db_column='thicknesssizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    qsizeok = models.CharField(db_column='qsizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    ssizeok = models.CharField(db_column='ssizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machine_id = models.IntegerField()
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    emp_id = models.IntegerField()
    weight = models.FloatField(blank=True, null=True)
    devid = models.CharField(max_length=40, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint1 = models.FloatField(blank=True, null=True)
    tpoint2 = models.FloatField(blank=True, null=True)
    tpoint3 = models.FloatField(blank=True, null=True)
    tpoint4 = models.FloatField(blank=True, null=True)
    tpoint1ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint2ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint3ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tpoint4ok = models.CharField(max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    tdiff = models.FloatField(blank=True, null=True)
    tmin = models.FloatField(blank=True, null=True)
    tmax = models.FloatField(blank=True, null=True)
    hdev = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    hsizeproxy = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    restricts = models.CharField(max_length=40, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    shift = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    mode = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    cal_mode = models.IntegerField(blank=True, null=True)
    diasize = models.FloatField(blank=True, null=True)
    diasizeok = models.CharField(db_column='diasizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    censize = models.FloatField(blank=True, null=True)
    censizeok = models.CharField(db_column='censizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    osize = models.FloatField(blank=True, null=True)
    osizeok = models.CharField(db_column='osizeOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size1 = models.FloatField(blank=True, null=True)
    size2 = models.FloatField(blank=True, null=True)
    size1ok = models.CharField(db_column='size1Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size2ok = models.CharField(db_column='size2Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size1name = models.CharField(db_column='size1Name', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    size2name = models.CharField(db_column='size2Name', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    bsize = models.FloatField(blank=True, null=True)
    bsizeok = models.CharField(db_column='bsizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    lsize = models.FloatField(blank=True, null=True)
    lsizeok = models.CharField(db_column='lsizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    zsize = models.FloatField(blank=True, null=True)
    zsizeok = models.CharField(db_column='zsizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    x1size = models.FloatField(blank=True, null=True)
    x1sizeok = models.CharField(db_column='x1sizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    x2size = models.FloatField(blank=True, null=True)
    x2sizeok = models.CharField(db_column='x2sizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    tpresssize = models.FloatField(blank=True, null=True)
    tpresssizeok = models.CharField(db_column='tpresssizeOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t1 = models.FloatField()
    t2 = models.FloatField()
    t3 = models.FloatField()
    t4 = models.FloatField()
    t1ok = models.CharField(db_column='t1Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t2ok = models.CharField(db_column='t2Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t3ok = models.CharField(db_column='t3Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t4ok = models.CharField(db_column='t4Ok', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t4avg = models.FloatField()
    tpok = models.CharField(db_column='tpOk', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    t4min = models.FloatField(blank=True, null=True)
    t4max = models.FloatField(blank=True, null=True)
    t4diff = models.FloatField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data_ms_LOT2210062522'
        app_label = "legacy"

class DataRl(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    avg = models.FloatField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    rgrade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    r_type = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    p1 = models.FloatField(blank=True, null=True)
    p2 = models.FloatField(blank=True, null=True)
    p3 = models.FloatField(blank=True, null=True)
    p4 = models.FloatField(blank=True, null=True)
    p5 = models.FloatField(blank=True, null=True)
    p6 = models.FloatField(blank=True, null=True)
    p7 = models.FloatField(blank=True, null=True)
    p8 = models.FloatField(blank=True, null=True)
    p9 = models.FloatField(blank=True, null=True)
    p10 = models.FloatField(blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    ndata = models.IntegerField(blank=True, null=True)
    sub_order = models.IntegerField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    header = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data_rl'
        app_label = "legacy"


class DataWb(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    result = models.FloatField(blank=True, null=True)
    weight = models.FloatField(blank=True, null=True)
    judgement = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    emp_id = models.IntegerField(blank=True, null=True)
    repair_by = models.CharField(max_length=30, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data_wb'
        app_label = "legacy"


class DataWbTest(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    result = models.FloatField(blank=True, null=True)
    weight = models.FloatField(blank=True, null=True)
    judgement = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    emp_id = models.IntegerField(blank=True, null=True)
    repair_by = models.CharField(max_length=30, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'data_wb_test'
        app_label = "legacy"


class LoginTemps(models.Model):
    empid = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    password = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'login_temps'
        app_label = "legacy"


class Lot(models.Model):
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'lot'


class LotRl(models.Model):
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'lot_rl'
        app_label = "legacy"


class LotSummary(models.Model):
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    created_at = models.DateTimeField()
    avg = models.FloatField()
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    start_time = models.DateTimeField(blank=True, null=True)
    end_time = models.DateTimeField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    avg0 = models.FloatField(blank=True, null=True)
    avg1 = models.FloatField(blank=True, null=True)
    avg2 = models.FloatField(blank=True, null=True)
    avg3 = models.FloatField(blank=True, null=True)
    avg0_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg1_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg2_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg3_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'lot_summary'
        app_label = "legacy"


class LotSummary20082018(models.Model):
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    created_at = models.DateTimeField()
    avg = models.FloatField()
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    start_time = models.DateTimeField(blank=True, null=True)
    end_time = models.DateTimeField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    avg0 = models.FloatField(blank=True, null=True)
    avg1 = models.FloatField(blank=True, null=True)
    avg2 = models.FloatField(blank=True, null=True)
    avg3 = models.FloatField(blank=True, null=True)
    avg0_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg1_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg2_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg3_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'lot_summary (2008-2018)'
        app_label = "legacy"


class LotSummaryRl(models.Model):
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    created_at = models.DateTimeField()
    avg = models.FloatField()
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    start_time = models.DateTimeField(blank=True, null=True)
    end_time = models.DateTimeField(blank=True, null=True)
    grade = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    avg0 = models.FloatField(blank=True, null=True)
    avg1 = models.FloatField(blank=True, null=True)
    avg2 = models.FloatField(blank=True, null=True)
    avg3 = models.FloatField(blank=True, null=True)
    avg0_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg1_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg2_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    avg3_name = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'lot_summary_rl'
        app_label = "legacy"


class LotSummaryWb(models.Model):
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    created_at = models.DateTimeField()
    w_avg = models.FloatField()
    wb_avg = models.FloatField()
    cp = models.FloatField()
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    start_time = models.DateTimeField(blank=True, null=True)
    end_time = models.DateTimeField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'lot_summary_wb'
        app_label = "legacy"


class Machinegroup(models.Model):
    groupname = models.CharField(db_column='groupName', max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'machineGroup'
        app_label = "legacy"


class Machines(models.Model):
    name = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    description = models.TextField(db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    tag_name = models.TextField(db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'machines'
        app_label = "legacy"


class MachinesWb(models.Model):
    name = models.TextField(db_collation='SQL_Latin1_General_CP1_CI_AS')
    description = models.TextField(db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField()
    updated_at = models.DateTimeField(blank=True, null=True)
    tag_name = models.TextField(db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    ip = models.TextField(db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    isactive = models.BooleanField(db_column='isActive')  # Field name made lowercase.
    machinestd = models.FloatField(db_column='machineStd', blank=True, null=True)  # Field name made lowercase.
    groupid = models.ForeignKey(Machinegroup, models.DO_NOTHING, db_column='groupId', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'machines_wb'
        app_label = "legacy"

class Manualsize(models.Model):
    lotno = models.CharField(db_column='lotNo', primary_key=True, max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS')  # Field name made lowercase. The composite primary key (lotNo, Size_Name) found, that is not supported. The first column is selected.
    size_name = models.CharField(db_column='Size_Name', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')  # Field name made lowercase.
    std = models.FloatField(db_column='Std', blank=True, null=True)  # Field name made lowercase.
    tolun = models.FloatField(db_column='TolUn', blank=True, null=True)  # Field name made lowercase.
    tolup = models.FloatField(db_column='TolUp', blank=True, null=True)  # Field name made lowercase.
    created_at = models.DateTimeField()
    productcode = models.CharField(db_column='ProductCode', max_length=30, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'manualSize'
        unique_together = (('lotno', 'size_name'),)
        app_label = "legacy"


class PressCal(models.Model):
    v0 = models.FloatField(blank=True, null=True)
    lot_no = models.CharField(primary_key=True, max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS')
    v1 = models.FloatField(blank=True, null=True)
    v2 = models.FloatField(blank=True, null=True)
    v3 = models.FloatField(blank=True, null=True)
    v4 = models.FloatField(blank=True, null=True)
    v5 = models.FloatField(blank=True, null=True)
    v6 = models.FloatField(blank=True, null=True)
    y0 = models.FloatField(blank=True, null=True)
    y1 = models.FloatField(blank=True, null=True)
    y2 = models.FloatField(blank=True, null=True)
    ac1 = models.FloatField(blank=True, null=True)
    ac2 = models.FloatField(blank=True, null=True)
    ac3 = models.FloatField(blank=True, null=True)
    ac4 = models.FloatField(blank=True, null=True)
    ac5 = models.FloatField(blank=True, null=True)
    ac6 = models.FloatField(blank=True, null=True)
    ac7 = models.FloatField(blank=True, null=True)
    r_result = models.FloatField(blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    c0 = models.FloatField()

    class Meta:
        managed = False
        db_table = 'press_cal'
        app_label = "legacy"


class RotateData(models.Model):
    row_no = models.IntegerField(blank=True, null=True)
    lot_no = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    code = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    speed_spec = models.FloatField(blank=True, null=True)
    speed_test = models.FloatField(blank=True, null=True)
    speedok = models.CharField(db_column='speedOk', max_length=4, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    qty = models.IntegerField()
    station_no = models.IntegerField()
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    machine_id = models.IntegerField(blank=True, null=True)
    emp_id = models.IntegerField()
    devid = models.CharField(max_length=40, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    mode = models.CharField(max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    cal_mode = models.IntegerField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'rotate_data'
        app_label = "legacy"


class SchemaMigrations(models.Model):
    version = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS')

    class Meta:
        managed = False
        db_table = 'schema_migrations'


class SplitData(models.Model):
    data_ms = models.ForeignKey(DataMs, models.DO_NOTHING)
    v1 = models.FloatField(blank=True, null=True)
    v2 = models.FloatField(blank=True, null=True)
    v3 = models.FloatField(blank=True, null=True)
    v4 = models.FloatField(blank=True, null=True)
    v5 = models.FloatField(blank=True, null=True)
    unit = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    vr = models.FloatField(blank=True, null=True)
    vname = models.CharField(max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    no = models.IntegerField()
    v1ok = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    v2ok = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    v3ok = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    v4ok = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    v5ok = models.CharField(max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    vmax = models.FloatField(blank=True, null=True)
    vmin = models.FloatField(blank=True, null=True)
    vdiff = models.FloatField(blank=True, null=True)
    row_no = models.IntegerField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'split_data'
        app_label = "legacy"


class SysConfigs(models.Model):
    title = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    value = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'sys_configs'
        app_label = "legacy"


class TbFgPressinfoLotlist(models.Model):
    product_year = models.CharField(db_column='Product_Year', primary_key=True, max_length=10, db_collation='SQL_Latin1_General_CP1_CI_AS')  # Field name made lowercase. The composite primary key (Product_Year, ProductCode, LotNo) found, that is not supported. The first column is selected.
    productcode = models.CharField(db_column='ProductCode', max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS')  # Field name made lowercase.
    lotno = models.CharField(db_column='LotNo', max_length=20, db_collation='SQL_Latin1_General_CP1_CI_AS')  # Field name made lowercase.
    lot_qty = models.FloatField(db_column='Lot_Qty', blank=True, null=True)  # Field name made lowercase.
    def_qty = models.FloatField(db_column='Def_Qty', blank=True, null=True)  # Field name made lowercase.
    fg_qty = models.FloatField(db_column='FG_Qty', blank=True, null=True)  # Field name made lowercase.
    insp_date = models.DateTimeField(db_column='Insp_Date', blank=True, null=True)  # Field name made lowercase.
    current_prono = models.CharField(db_column='Current_ProNo', max_length=5, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    press_mcname = models.CharField(db_column='Press_McName', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.
    press_username = models.CharField(db_column='Press_UserName', max_length=50, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'tb_fg_pressinfo_lotlist'
        unique_together = (('product_year', 'productcode', 'lotno'),)
        app_label = "legacy"


class TbWbStdCode12(models.Model):
    id = models.IntegerField(db_column='ID', primary_key=True)  # Field name made lowercase.
    u_weight = models.FloatField(db_column='U_Weight', blank=True, null=True)  # Field name made lowercase.
    speed_from = models.FloatField(db_column='Speed_From', blank=True, null=True)  # Field name made lowercase.
    speed_to = models.FloatField(db_column='Speed_To', blank=True, null=True)  # Field name made lowercase.
    diameter_from = models.FloatField(db_column='Diameter_From', blank=True, null=True)  # Field name made lowercase.
    diameter_to = models.FloatField(db_column='Diameter_To', blank=True, null=True)  # Field name made lowercase.
    std_balance = models.FloatField(db_column='STD_Balance', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'tb_wb_std_code_1-2'
        app_label = "legacy"


class TbWbStdCode345(models.Model):
    id = models.IntegerField(db_column='ID', primary_key=True)  # Field name made lowercase.
    u_weight = models.FloatField(db_column='U_Weight', blank=True, null=True)  # Field name made lowercase.
    speed_from = models.FloatField(db_column='Speed_From', blank=True, null=True)  # Field name made lowercase.
    speed_to = models.FloatField(db_column='Speed_To', blank=True, null=True)  # Field name made lowercase.
    diameter_from = models.FloatField(db_column='Diameter_From', blank=True, null=True)  # Field name made lowercase.
    diameter_to = models.FloatField(db_column='Diameter_To', blank=True, null=True)  # Field name made lowercase.
    std_balance = models.FloatField(db_column='STD_Balance', blank=True, null=True)  # Field name made lowercase.

    class Meta:
        managed = False
        db_table = 'tb_wb_std_code_3-4-5'
        app_label = "legacy"


class LegacyUsers(models.Model):
    email = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    password_digest = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    created_at = models.DateTimeField(blank=True, null=True)
    updated_at = models.DateTimeField(blank=True, null=True)
    roles_mask = models.IntegerField(blank=True, null=True)
    empid = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    fname = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)
    lname = models.CharField(max_length=255, db_collation='SQL_Latin1_General_CP1_CI_AS', blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'users'
        app_label = "legacy"


