from django.db import models

class ListModel(models.Model):
    appid = models.CharField(max_length=50)
    name = models.CharField(max_length=50)
    so_status = models.IntegerField(default=1)
    create_name = models.CharField(max_length=50)
    customer = models.CharField(max_length=50)
    t_code = models.CharField(max_length=50)
    is_delete = models.IntegerField(default=0)
    create_time = models.DateTimeField(auto_now_add=True)
    last_update_time = models.DateTimeField(auto_now=True)

class DetailModel(models.Model):
    appid = models.CharField(max_length=50)
    name = models.CharField(max_length=50)
    so_status = models.IntegerField(default=1)
    goods_code = models.CharField(max_length=50)
    goods_name = models.CharField(max_length=50)
    so_qty = models.IntegerField(default=0)
    pick_stock = models.IntegerField(default=0)
    pick_down_qty = models.IntegerField(default=0)
    picked_stock = models.IntegerField(default=0)
    picked_down_qty = models.IntegerField(default=0)
    oos_qty = models.IntegerField(default=0)
    shipping_qty = models.IntegerField(default=0)
    receive_qty = models.IntegerField(default=0)
    damage_qty = models.IntegerField(default=0)
    shortage_qty = models.IntegerField(default=0)
    customer = models.CharField(max_length=50)
    create_name = models.CharField(max_length=50)
    t_code = models.CharField(max_length=50)
    is_delete = models.IntegerField(default=0)
    create_time = models.DateTimeField(auto_now_add=True)
    last_update_time = models.DateTimeField(auto_now=True)

class PickingModel(models.Model):
    appid = models.CharField(max_length=50)
    bin_name = models.CharField(max_length=50)
    so_name = models.CharField(max_length=50)
    picking_status = models.IntegerField(default=0)
    goods_code = models.CharField(max_length=50)
    goods_name = models.CharField(max_length=50)
    pick_stock = models.IntegerField(default=0)
    picked_stock = models.IntegerField(default=0)
    shipping_stock = models.IntegerField(default=0)
    customer = models.CharField(max_length=50)
    picking_people = models.CharField(max_length=50)
    plate_license = models.CharField(max_length=50)
    create_name = models.CharField(max_length=50)
    t_code = models.CharField(max_length=50)
    is_delete = models.IntegerField(default=0)
    create_time = models.DateTimeField(auto_now_add=True)
    last_update_time = models.DateTimeField(auto_now=True)
