Advertisement
Pandaaaa906

Untitled

May 5th, 2021
1,241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 33.47 KB | None | 0 0
  1. from sqlalchemy import Column, NVARCHAR, DATETIME, INTEGER, FLOAT, SMALLINT, DECIMAL, func
  2. from sqlalchemy.dialects.mssql import TINYINT, BIT, TIMESTAMP, UNIQUEIDENTIFIER
  3.  
  4. from .database import Base
  5.  
  6.  
  7. class Inventory(Base):
  8.     __tablename__ = "Inventory"
  9.     __table_args__ = {
  10.         'implicit_returning': False
  11.     }
  12.  
  13.     cInvCode = Column('cInvCode', NVARCHAR(60), nullable=False, default=None, unique=True)
  14.     cInvAddCode = Column('cInvAddCode', NVARCHAR(255), nullable=True, default=None)
  15.     cInvName = Column('cInvName', NVARCHAR(255), nullable=True, default=None)
  16.     cInvStd = Column('cInvStd', NVARCHAR(255), nullable=True, default=None)
  17.     cInvCCode = Column('cInvCCode', NVARCHAR(12), nullable=True, default=None)
  18.     cVenCode = Column('cVenCode', NVARCHAR(20), nullable=True, default=None)
  19.     cReplaceItem = Column('cReplaceItem', NVARCHAR(60), nullable=True, default=None)
  20.     cPosition = Column('cPosition', NVARCHAR(20), nullable=True, default=None)
  21.     bSale = Column('bSale', BIT, nullable=False, default=1)
  22.     bPurchase = Column('bPurchase', BIT, nullable=False, default=1)
  23.     bSelf = Column('bSelf', BIT, nullable=False, default=0)
  24.     bComsume = Column('bComsume', BIT, nullable=False, default=1)
  25.     bProducing = Column('bProducing', BIT, nullable=False, default=0)
  26.     bService = Column('bService', BIT, nullable=False, default=0)
  27.     bAccessary = Column('bAccessary', BIT, nullable=False, default=0)
  28.     iTaxRate = Column('iTaxRate', FLOAT, nullable=True, default=17)
  29.     iInvWeight = Column('iInvWeight', FLOAT, nullable=True, default=None)
  30.     iVolume = Column('iVolume', FLOAT, nullable=True, default=None)
  31.     iInvRCost = Column('iInvRCost', FLOAT, nullable=True, default=None)
  32.     iInvSPrice = Column('iInvSPrice', FLOAT, nullable=True, default=None)
  33.     iInvSCost = Column('iInvSCost', FLOAT, nullable=True, default=None)
  34.     iInvLSCost = Column('iInvLSCost', FLOAT, nullable=True, default=None)
  35.     iInvNCost = Column('iInvNCost', FLOAT, nullable=True, default=None)
  36.     iInvAdvance = Column('iInvAdvance', FLOAT, nullable=True, default=0)
  37.     iInvBatch = Column('iInvBatch', FLOAT, nullable=True, default=None)
  38.     iSafeNum = Column('iSafeNum', FLOAT, nullable=True, default=None)
  39.     iTopSum = Column('iTopSum', FLOAT, nullable=True, default=None)
  40.     iLowSum = Column('iLowSum', FLOAT, nullable=True, default=None)
  41.     iOverStock = Column('iOverStock', FLOAT, nullable=True, default=None)
  42.     cInvABC = Column('cInvABC', NVARCHAR(1), nullable=True, default=None)
  43.     bInvQuality = Column('bInvQuality', BIT, nullable=False, default=1)
  44.     bInvBatch = Column('bInvBatch', BIT, nullable=False, default=1)
  45.     bInvEntrust = Column('bInvEntrust', BIT, nullable=False, default=0)
  46.     bInvOverStock = Column('bInvOverStock', BIT, nullable=False, default=0)
  47.     dSDate = Column('dSDate', DATETIME, nullable=True, default=None)
  48.     dEDate = Column('dEDate', DATETIME, nullable=True, default=None)
  49.     bFree1 = Column('bFree1', BIT, nullable=False, default=0)
  50.     bFree2 = Column('bFree2', BIT, nullable=False, default=0)
  51.     cInvDefine1 = Column('cInvDefine1', NVARCHAR(20), nullable=True, default=None)
  52.     cInvDefine2 = Column('cInvDefine2', NVARCHAR(20), nullable=True, default=None)
  53.     cInvDefine3 = Column('cInvDefine3', NVARCHAR(20), nullable=True, default=None)
  54.     I_id = Column('I_id', INTEGER, primary_key=True)  # identity
  55.     bInvType = Column('bInvType', BIT, nullable=True, default=0)
  56.     iInvMPCost = Column('iInvMPCost', FLOAT, nullable=True, default=None)
  57.     cQuality = Column('cQuality', NVARCHAR(100), nullable=True, default=None)
  58.     iInvSaleCost = Column('iInvSaleCost', FLOAT, nullable=True, default=None)
  59.     iInvSCost1 = Column('iInvSCost1', FLOAT, nullable=True, default=None)
  60.     iInvSCost2 = Column('iInvSCost2', FLOAT, nullable=True, default=None)
  61.     iInvSCost3 = Column('iInvSCost3', FLOAT, nullable=True, default=None)
  62.     bFree3 = Column('bFree3', BIT, nullable=False, default=0)
  63.     bFree4 = Column('bFree4', BIT, nullable=False, default=0)
  64.     bFree5 = Column('bFree5', BIT, nullable=False, default=0)
  65.     bFree6 = Column('bFree6', BIT, nullable=False, default=0)
  66.     bFree7 = Column('bFree7', BIT, nullable=False, default=0)
  67.     bFree8 = Column('bFree8', BIT, nullable=False, default=0)
  68.     bFree9 = Column('bFree9', BIT, nullable=False, default=0)
  69.     bFree10 = Column('bFree10', BIT, nullable=False, default=0)
  70.     cCreatePerson = Column('cCreatePerson', NVARCHAR(20), nullable=True, default=None)
  71.     cModifyPerson = Column('cModifyPerson', NVARCHAR(20), nullable=True, default=None)
  72.     dModifyDate = Column('dModifyDate', DATETIME, nullable=True, default=None)
  73.     fSubscribePoint = Column('fSubscribePoint', FLOAT, nullable=True, default=None)
  74.     fVagQuantity = Column('fVagQuantity', FLOAT, nullable=True, default=None)
  75.     cValueType = Column('cValueType', NVARCHAR(20), nullable=True, default=None)
  76.     bFixExch = Column('bFixExch', BIT, nullable=False, default=0)
  77.     fOutExcess = Column('fOutExcess', FLOAT, nullable=True, default=200)
  78.     fInExcess = Column('fInExcess', FLOAT, nullable=True, default=None)
  79.     iMassDate = Column('iMassDate', SMALLINT, nullable=True, default=None)
  80.     iWarnDays = Column('iWarnDays', SMALLINT, nullable=True, default=185)
  81.     fExpensesExch = Column('fExpensesExch', FLOAT, nullable=True, default=None)
  82.     bTrack = Column('bTrack', BIT, nullable=False, default=0)
  83.     bSerial = Column('bSerial', BIT, nullable=False, default=0)
  84.     bBarCode = Column('bBarCode', BIT, nullable=False, default=0)
  85.     iId = Column('iId', INTEGER, nullable=True, default=None)
  86.     cBarCode = Column('cBarCode', NVARCHAR(30), nullable=True, default=None)
  87.     cInvDefine4 = Column('cInvDefine4', NVARCHAR(60), nullable=True, default=None)
  88.     cInvDefine5 = Column('cInvDefine5', NVARCHAR(60), nullable=True, default=None)
  89.     cInvDefine6 = Column('cInvDefine6', NVARCHAR(60), nullable=True, default=None)
  90.     cInvDefine7 = Column('cInvDefine7', NVARCHAR(120), nullable=True, default=None)
  91.     cInvDefine8 = Column('cInvDefine8', NVARCHAR(120), nullable=True, default=None)
  92.     cInvDefine9 = Column('cInvDefine9', NVARCHAR(120), nullable=True, default=None)
  93.     cInvDefine10 = Column('cInvDefine10', NVARCHAR(120), nullable=True, default=None)
  94.     cInvDefine11 = Column('cInvDefine11', INTEGER, nullable=True, default=None)
  95.     cInvDefine12 = Column('cInvDefine12', INTEGER, nullable=True, default=None)
  96.     cInvDefine13 = Column('cInvDefine13', FLOAT, nullable=True, default=None)
  97.     cInvDefine14 = Column('cInvDefine14', FLOAT, nullable=True, default=None)
  98.     cInvDefine15 = Column('cInvDefine15', DATETIME, nullable=True, default=None)
  99.     cInvDefine16 = Column('cInvDefine16', DATETIME, nullable=True, default=None)
  100.     iGroupType = Column('iGroupType', TINYINT, nullable=False, default=0)
  101.     cGroupCode = Column('cGroupCode', NVARCHAR(35), nullable=True, default=None)
  102.     cComUnitCode = Column('cComUnitCode', NVARCHAR(35), nullable=True, default=None)
  103.     cAssComUnitCode = Column('cAssComUnitCode', NVARCHAR(35), nullable=True, default=None)
  104.     cSAComUnitCode = Column('cSAComUnitCode', NVARCHAR(35), nullable=True, default=None)
  105.     cPUComUnitCode = Column('cPUComUnitCode', NVARCHAR(35), nullable=True, default=None)
  106.     cSTComUnitCode = Column('cSTComUnitCode', NVARCHAR(35), nullable=True, default=None)
  107.     cCAComUnitCode = Column('cCAComUnitCode', NVARCHAR(35), nullable=True, default=None)
  108.     cFrequency = Column('cFrequency', NVARCHAR(10), nullable=True, default=None)
  109.     iFrequency = Column('iFrequency', SMALLINT, nullable=True, default=None)
  110.     iDays = Column('iDays', SMALLINT, nullable=True, default=None)
  111.     dLastDate = Column('dLastDate', DATETIME, nullable=True, default=None)
  112.     iWastage = Column('iWastage', FLOAT, nullable=True, default=None)
  113.     bSolitude = Column('bSolitude', BIT, nullable=False, default=0)
  114.     cEnterprise = Column('cEnterprise', NVARCHAR(100), nullable=True, default=None)
  115.     cAddress = Column('cAddress', NVARCHAR(255), nullable=True, default=None)
  116.     cFile = Column('cFile', NVARCHAR(40), nullable=True, default=None)
  117.     cLabel = Column('cLabel', NVARCHAR(30), nullable=True, default=None)
  118.     cCheckOut = Column('cCheckOut', NVARCHAR(30), nullable=True, default=None)
  119.     cLicence = Column('cLicence', NVARCHAR(30), nullable=True, default=None)
  120.     bSpecialties = Column('bSpecialties', BIT, nullable=False, default=0)
  121.     cDefWareHouse = Column('cDefWareHouse', NVARCHAR(10), nullable=True, default=None)
  122.     iHighPrice = Column('iHighPrice', FLOAT, nullable=True, default=None)
  123.     iExpSaleRate = Column('iExpSaleRate', FLOAT, nullable=True, default=None)
  124.     cPriceGroup = Column('cPriceGroup', NVARCHAR(20), nullable=True, default=None)
  125.     cOfferGrade = Column('cOfferGrade', NVARCHAR(20), nullable=True, default=None)
  126.     iOfferRate = Column('iOfferRate', FLOAT, nullable=True, default=None)
  127.     cMonth = Column('cMonth', NVARCHAR(6), nullable=True, default=None)
  128.     iAdvanceDate = Column('iAdvanceDate', SMALLINT, nullable=True, default=None)
  129.     cCurrencyName = Column('cCurrencyName', NVARCHAR(60), nullable=True, default=None)
  130.     cProduceAddress = Column('cProduceAddress', NVARCHAR(255), nullable=True, default=None)
  131.     cProduceNation = Column('cProduceNation', NVARCHAR(60), nullable=True, default=None)
  132.     cRegisterNo = Column('cRegisterNo', NVARCHAR(60), nullable=True, default=None)
  133.     cEnterNo = Column('cEnterNo', NVARCHAR(60), nullable=True, default=None)
  134.     cPackingType = Column('cPackingType', NVARCHAR(60), nullable=True, default=None)
  135.     cEnglishName = Column('cEnglishName', NVARCHAR(100), nullable=True, default=None)
  136.     bPropertyCheck = Column('bPropertyCheck', BIT, nullable=False, default=0)
  137.     cPreparationType = Column('cPreparationType', NVARCHAR(30), nullable=True, default=None)
  138.     cCommodity = Column('cCommodity', NVARCHAR(60), nullable=True, default=None)
  139.     iRecipeBatch = Column('iRecipeBatch', TINYINT, nullable=False, default=0)
  140.     cNotPatentName = Column('cNotPatentName', NVARCHAR(30), nullable=True, default=None)
  141.     pubufts = Column('pubufts', TIMESTAMP, nullable=True, default=None)
  142.     bPromotSales = Column('bPromotSales', BIT, nullable=False, default=0)
  143.     iPlanPolicy = Column('iPlanPolicy', SMALLINT, nullable=True, default=None)
  144.     iROPMethod = Column('iROPMethod', SMALLINT, nullable=True, default=None)
  145.     iBatchRule = Column('iBatchRule', SMALLINT, nullable=True, default=None)
  146.     fBatchIncrement = Column('fBatchIncrement', FLOAT, nullable=True, default=None)
  147.     iAssureProvideDays = Column('iAssureProvideDays', INTEGER, nullable=True, default=None)
  148.     iTestStyle = Column('iTestStyle', SMALLINT, nullable=True, default=None)
  149.     iDTMethod = Column('iDTMethod', SMALLINT, nullable=True, default=None)
  150.     fDTRate = Column('fDTRate', FLOAT, nullable=True, default=None)
  151.     fDTNum = Column('fDTNum', FLOAT, nullable=True, default=None)
  152.     cDTUnit = Column('cDTUnit', NVARCHAR(35), nullable=True, default=None)
  153.     iDTStyle = Column('iDTStyle', SMALLINT, nullable=True, default=None)
  154.     iQTMethod = Column('iQTMethod', INTEGER, nullable=True, default=None)
  155.     PictureGUID = Column('PictureGUID', UNIQUEIDENTIFIER, nullable=True, default=None)
  156.     bPlanInv = Column('bPlanInv', BIT, nullable=False, default=0)
  157.     bProxyForeign = Column('bProxyForeign', BIT, nullable=False, default=0)
  158.     bATOModel = Column('bATOModel', BIT, nullable=False, default=0)
  159.     bCheckItem = Column('bCheckItem', BIT, nullable=False, default=0)
  160.     bPTOModel = Column('bPTOModel', BIT, nullable=False, default=0)
  161.     bEquipment = Column('bEquipment', BIT, nullable=False, default=0)
  162.     cProductUnit = Column('cProductUnit', NVARCHAR(35), nullable=True, default=None)
  163.     fOrderUpLimit = Column('fOrderUpLimit', FLOAT, nullable=True, default=None)
  164.     cMassUnit = Column('cMassUnit', SMALLINT, nullable=True, default=0)
  165.     fRetailPrice = Column('fRetailPrice', FLOAT, nullable=True, default=None)
  166.     cInvDepCode = Column('cInvDepCode', NVARCHAR(12), nullable=True, default=None)
  167.     iAlterAdvance = Column('iAlterAdvance', INTEGER, nullable=True, default=None)
  168.     fAlterBaseNum = Column('fAlterBaseNum', FLOAT, nullable=True, default=None)
  169.     cPlanMethod = Column('cPlanMethod', NVARCHAR(1), nullable=True, default='L')
  170.     bMPS = Column('bMPS', BIT, nullable=False, default=0)
  171.     bROP = Column('bROP', BIT, nullable=False, default=0)
  172.     bRePlan = Column('bRePlan', BIT, nullable=False, default=0)
  173.     cSRPolicy = Column('cSRPolicy', NVARCHAR(2), nullable=True, default='PE')
  174.     bBillUnite = Column('bBillUnite', BIT, nullable=False, default=0)
  175.     iSupplyDay = Column('iSupplyDay', INTEGER, nullable=True, default=None)
  176.     fSupplyMulti = Column('fSupplyMulti', FLOAT, nullable=True, default=None)
  177.     fMinSupply = Column('fMinSupply', FLOAT, nullable=True, default=None)
  178.     bCutMantissa = Column('bCutMantissa', BIT, nullable=False, default=0)
  179.     cInvPersonCode = Column('cInvPersonCode', NVARCHAR(20), nullable=True, default=None)
  180.     iInvTfId = Column('iInvTfId', INTEGER, nullable=True, default=None)
  181.     cEngineerFigNo = Column('cEngineerFigNo', NVARCHAR(60), nullable=True, default=None)
  182.     bInTotalCost = Column('bInTotalCost', BIT, nullable=False, default=1)
  183.     iSupplyType = Column('iSupplyType', SMALLINT, nullable=False, default=0)
  184.     bConfigFree1 = Column('bConfigFree1', BIT, nullable=False, default=0)
  185.     bConfigFree2 = Column('bConfigFree2', BIT, nullable=False, default=0)
  186.     bConfigFree3 = Column('bConfigFree3', BIT, nullable=False, default=0)
  187.     bConfigFree4 = Column('bConfigFree4', BIT, nullable=False, default=0)
  188.     bConfigFree5 = Column('bConfigFree5', BIT, nullable=False, default=0)
  189.     bConfigFree6 = Column('bConfigFree6', BIT, nullable=False, default=0)
  190.     bConfigFree7 = Column('bConfigFree7', BIT, nullable=False, default=0)
  191.     bConfigFree8 = Column('bConfigFree8', BIT, nullable=False, default=0)
  192.     bConfigFree9 = Column('bConfigFree9', BIT, nullable=False, default=0)
  193.     bConfigFree10 = Column('bConfigFree10', BIT, nullable=False, default=0)
  194.     iDTLevel = Column('iDTLevel', SMALLINT, nullable=True, default=None)
  195.     cDTAQL = Column('cDTAQL', NVARCHAR(20), nullable=True, default=None)
  196.     bPeriodDT = Column('bPeriodDT', BIT, nullable=False, default=0)
  197.     cDTPeriod = Column('cDTPeriod', NVARCHAR(30), nullable=True, default=None)
  198.     iBigMonth = Column('iBigMonth', INTEGER, nullable=True, default=None)
  199.     iBigDay = Column('iBigDay', INTEGER, nullable=True, default=None)
  200.     iSmallMonth = Column('iSmallMonth', INTEGER, nullable=True, default=None)
  201.     iSmallDay = Column('iSmallDay', INTEGER, nullable=True, default=None)
  202.     bOutInvDT = Column('bOutInvDT', BIT, nullable=False, default=0)
  203.     bBackInvDT = Column('bBackInvDT', BIT, nullable=False, default=0)
  204.     iEndDTStyle = Column('iEndDTStyle', SMALLINT, nullable=True, default=None)
  205.     bDTWarnInv = Column('bDTWarnInv', BIT, nullable=True, default=0)
  206.     fBackTaxRate = Column('fBackTaxRate', FLOAT, nullable=True, default=None)
  207.     cCIQCode = Column('cCIQCode', NVARCHAR(30), nullable=True, default=None)
  208.     cWGroupCode = Column('cWGroupCode', NVARCHAR(35), nullable=True, default=None)
  209.     cWUnit = Column('cWUnit', NVARCHAR(35), nullable=True, default=None)
  210.     fGrossW = Column('fGrossW', FLOAT, nullable=True, default=None)
  211.     cVGroupCode = Column('cVGroupCode', NVARCHAR(35), nullable=True, default=None)
  212.     cVUnit = Column('cVUnit', NVARCHAR(35), nullable=True, default=None)
  213.     fLength = Column('fLength', FLOAT, nullable=True, default=None)
  214.     fWidth = Column('fWidth', FLOAT, nullable=True, default=None)
  215.     fHeight = Column('fHeight', FLOAT, nullable=True, default=None)
  216.     iDTUCounter = Column('iDTUCounter', INTEGER, nullable=True, default=None)
  217.     iDTDCounter = Column('iDTDCounter', INTEGER, nullable=True, default=None)
  218.     iBatchCounter = Column('iBatchCounter', INTEGER, nullable=True, default=None)
  219.     cShopUnit = Column('cShopUnit', NVARCHAR(35), nullable=True, default='01')
  220.     cPurPersonCode = Column('cPurPersonCode', NVARCHAR(20), nullable=True, default=None)
  221.     bImportMedicine = Column('bImportMedicine', BIT, nullable=False, default=0)
  222.     bFirstBusiMedicine = Column('bFirstBusiMedicine', BIT, nullable=False, default=0)
  223.     bForeExpland = Column('bForeExpland', BIT, nullable=False, default=0)
  224.     cInvPlanCode = Column('cInvPlanCode', NVARCHAR(20), nullable=True, default=None)
  225.     fConvertRate = Column('fConvertRate', FLOAT, nullable=False, default=1)
  226.     dReplaceDate = Column('dReplaceDate', DATETIME, nullable=True, default=None)
  227.     bInvModel = Column('bInvModel', BIT, nullable=False, default=0)
  228.     bKCCutMantissa = Column('bKCCutMantissa', BIT, nullable=False, default=0)
  229.     bReceiptByDT = Column('bReceiptByDT', BIT, nullable=False, default=0)
  230.     iImpTaxRate = Column('iImpTaxRate', FLOAT, nullable=True, default=17)
  231.     iExpTaxRate = Column('iExpTaxRate', FLOAT, nullable=True, default=None)
  232.     bExpSale = Column('bExpSale', BIT, nullable=False, default=0)
  233.     iDrawBatch = Column('iDrawBatch', FLOAT, nullable=True, default=None)
  234.     bCheckBSATP = Column('bCheckBSATP', BIT, nullable=False, default=0)
  235.     cInvProjectCode = Column('cInvProjectCode', NVARCHAR(16), nullable=True, default=None)
  236.     iTestRule = Column('iTestRule', SMALLINT, nullable=True, default=None)
  237.     cRuleCode = Column('cRuleCode', NVARCHAR(20), nullable=True, default=None)
  238.     bCheckFree1 = Column('bCheckFree1', BIT, nullable=False, default=0)
  239.     bCheckFree2 = Column('bCheckFree2', BIT, nullable=False, default=0)
  240.     bCheckFree3 = Column('bCheckFree3', BIT, nullable=False, default=0)
  241.     bCheckFree4 = Column('bCheckFree4', BIT, nullable=False, default=0)
  242.     bCheckFree5 = Column('bCheckFree5', BIT, nullable=False, default=0)
  243.     bCheckFree6 = Column('bCheckFree6', BIT, nullable=False, default=0)
  244.     bCheckFree7 = Column('bCheckFree7', BIT, nullable=False, default=0)
  245.     bCheckFree8 = Column('bCheckFree8', BIT, nullable=False, default=0)
  246.     bCheckFree9 = Column('bCheckFree9', BIT, nullable=False, default=0)
  247.     bCheckFree10 = Column('bCheckFree10', BIT, nullable=False, default=0)
  248.     bBomMain = Column('bBomMain', BIT, nullable=False, default=1)
  249.     bBomSub = Column('bBomSub', BIT, nullable=False, default=1)
  250.     bProductBill = Column('bProductBill', BIT, nullable=False, default=1)
  251.     iCheckATP = Column('iCheckATP', SMALLINT, nullable=False, default=0)
  252.     iInvATPId = Column('iInvATPId', INTEGER, nullable=True, default=None)
  253.     iPlanTfDay = Column('iPlanTfDay', INTEGER, nullable=True, default=None)
  254.     iOverlapDay = Column('iOverlapDay', INTEGER, nullable=True, default=None)
  255.     bPiece = Column('bPiece', BIT, nullable=False, default=0)
  256.     bSrvItem = Column('bSrvItem', BIT, nullable=False, default=0)
  257.     bSrvFittings = Column('bSrvFittings', BIT, nullable=False, default=0)
  258.     fMaxSupply = Column('fMaxSupply', FLOAT, nullable=True, default=None)
  259.     fMinSplit = Column('fMinSplit', FLOAT, nullable=True, default=None)
  260.     bSpecialOrder = Column('bSpecialOrder', BIT, nullable=False, default=0)
  261.     bTrackSaleBill = Column('bTrackSaleBill', BIT, nullable=False, default=0)
  262.     cInvMnemCode = Column('cInvMnemCode', NVARCHAR(40), nullable=True, default=None)
  263.     iPlanDefault = Column('iPlanDefault', SMALLINT, nullable=True, default=1)
  264.     iPFBatchQty = Column('iPFBatchQty', FLOAT, nullable=True, default=None)
  265.     iAllocatePrintDgt = Column('iAllocatePrintDgt', INTEGER, nullable=True, default=4)
  266.     bCheckBatch = Column('bCheckBatch', BIT, nullable=False, default=0)
  267.     bMngOldpart = Column('bMngOldpart', BIT, nullable=False, default=0)
  268.     iOldpartMngRule = Column('iOldpartMngRule', SMALLINT, nullable=True, default=-1)
  269.  
  270.  
  271. class BasPart(Base):
  272.     __tablename__ = "bas_part"
  273.  
  274.     PartId = Column('PartId', INTEGER, nullable=False, primary_key=True, autoincrement=False)
  275.     InvCode = Column('InvCode', NVARCHAR(60), nullable=False, default=None)
  276.     Free1 = Column('Free1', NVARCHAR(20), nullable=False, default='')
  277.     Free2 = Column('Free2', NVARCHAR(20), nullable=False, default='')
  278.     Free3 = Column('Free3', NVARCHAR(20), nullable=False, default='')
  279.     Free4 = Column('Free4', NVARCHAR(20), nullable=False, default='')
  280.     Free5 = Column('Free5', NVARCHAR(20), nullable=False, default='')
  281.     Free6 = Column('Free6', NVARCHAR(20), nullable=False, default='')
  282.     Free7 = Column('Free7', NVARCHAR(20), nullable=False, default='')
  283.     Free8 = Column('Free8', NVARCHAR(20), nullable=False, default='')
  284.     Free9 = Column('Free9', NVARCHAR(20), nullable=False, default='')
  285.     Free10 = Column('Free10', NVARCHAR(20), nullable=False, default='')
  286.     SafeQty = Column('SafeQty', DECIMAL(28, 6), nullable=True, default=0)
  287.     MinQty = Column('MinQty', DECIMAL(28, 6), nullable=True, default=0)
  288.     MulQty = Column('MulQty', DECIMAL(28, 6), nullable=True, default=0)
  289.     FixQty = Column('FixQty', DECIMAL(28, 6), nullable=True, default=0)
  290.     bVirtual = Column('bVirtual', BIT, nullable=True, default=1)
  291.     DrawCode = Column('DrawCode', NVARCHAR(60), nullable=True, default=None)
  292.     Ufts = Column('Ufts', TIMESTAMP, nullable=True, default=None)
  293.     LLC = Column('LLC', INTEGER, nullable=True, default=0)
  294.     cBasEngineerFigNo = Column('cBasEngineerFigNo', NVARCHAR(60), nullable=True, default=None)
  295.     fBasMaxSupply = Column('fBasMaxSupply', FLOAT, nullable=True, default=None)
  296.     iSurenessType = Column('iSurenessType', SMALLINT, nullable=False, default=1)
  297.     iDateType = Column('iDateType', SMALLINT, nullable=True, default=None)
  298.     iDateSum = Column('iDateSum', INTEGER, nullable=True, default=None)
  299.     iDynamicSurenessType = Column('iDynamicSurenessType', SMALLINT, nullable=True, default=None)
  300.     iBestrowSum = Column('iBestrowSum', FLOAT, nullable=True, default=None)
  301.     iPercentumSum = Column('iPercentumSum', FLOAT, nullable=True, default=None)
  302.     RoundingFactor = Column('RoundingFactor', DECIMAL(28, 6), nullable=True)
  303.     FreeStockFlag = Column('FreeStockFlag', BIT, nullable=True, default=0)
  304.     bFreeStop = Column('bFreeStop', BIT, nullable=False, default=0)
  305.  
  306.  
  307. class InventorySub(Base):
  308.     __tablename__ = 'Inventory_Sub'
  309.  
  310.     cInvSubCode = Column('cInvSubCode', NVARCHAR(60), nullable=False, primary_key=True, autoincrement=False)
  311.     fBuyExcess = Column('fBuyExcess', FLOAT, nullable=True, default=None)
  312.     iSurenessType = Column('iSurenessType', SMALLINT, nullable=False, default=1)
  313.     iDateType = Column('iDateType', SMALLINT, nullable=True, default=None)
  314.     iDateSum = Column('iDateSum', INTEGER, nullable=True, default=None)
  315.     iDynamicSurenessType = Column('iDynamicSurenessType', SMALLINT, nullable=True, default=None)
  316.     iBestrowSum = Column('iBestrowSum', FLOAT, nullable=True, default=None)
  317.     iPercentumSum = Column('iPercentumSum', FLOAT, nullable=True, default=None)
  318.     bIsAttachFile = Column('bIsAttachFile', BIT, nullable=True, default=0)
  319.     bInByProCheck = Column('bInByProCheck', BIT, nullable=False, default=0)
  320.     iRequireTrackStyle = Column('iRequireTrackStyle', SMALLINT, nullable=False, default=0)
  321.     iExpiratDateCalcu = Column('iExpiratDateCalcu', SMALLINT, nullable=True, default=1)
  322.     iBOMExpandUnitType = Column('iBOMExpandUnitType', SMALLINT, nullable=False, default=1)
  323.     bPurPriceFree1 = Column('bPurPriceFree1', BIT, nullable=False, default=1)
  324.     bPurPriceFree2 = Column('bPurPriceFree2', BIT, nullable=False, default=0)
  325.     bPurPriceFree3 = Column('bPurPriceFree3', BIT, nullable=False, default=0)
  326.     bPurPriceFree4 = Column('bPurPriceFree4', BIT, nullable=False, default=0)
  327.     bPurPriceFree5 = Column('bPurPriceFree5', BIT, nullable=False, default=0)
  328.     bPurPriceFree6 = Column('bPurPriceFree6', BIT, nullable=False, default=0)
  329.     bPurPriceFree7 = Column('bPurPriceFree7', BIT, nullable=False, default=0)
  330.     bPurPriceFree8 = Column('bPurPriceFree8', BIT, nullable=False, default=0)
  331.     bPurPriceFree9 = Column('bPurPriceFree9', BIT, nullable=False, default=0)
  332.     bPurPriceFree10 = Column('bPurPriceFree10', BIT, nullable=False, default=0)
  333.     bOMPriceFree1 = Column('bOMPriceFree1', BIT, nullable=False, default=0)
  334.     bOMPriceFree2 = Column('bOMPriceFree2', BIT, nullable=False, default=0)
  335.     bOMPriceFree3 = Column('bOMPriceFree3', BIT, nullable=False, default=0)
  336.     bOMPriceFree4 = Column('bOMPriceFree4', BIT, nullable=False, default=0)
  337.     bOMPriceFree5 = Column('bOMPriceFree5', BIT, nullable=False, default=0)
  338.     bOMPriceFree6 = Column('bOMPriceFree6', BIT, nullable=False, default=0)
  339.     bOMPriceFree7 = Column('bOMPriceFree7', BIT, nullable=False, default=0)
  340.     bOMPriceFree8 = Column('bOMPriceFree8', BIT, nullable=False, default=0)
  341.     bOMPriceFree9 = Column('bOMPriceFree9', BIT, nullable=False, default=0)
  342.     bOMPriceFree10 = Column('bOMPriceFree10', BIT, nullable=False, default=0)
  343.     bSalePriceFree1 = Column('bSalePriceFree1', BIT, nullable=False, default=1)
  344.     bSalePriceFree2 = Column('bSalePriceFree2', BIT, nullable=False, default=0)
  345.     bSalePriceFree3 = Column('bSalePriceFree3', BIT, nullable=False, default=0)
  346.     bSalePriceFree4 = Column('bSalePriceFree4', BIT, nullable=False, default=0)
  347.     bSalePriceFree5 = Column('bSalePriceFree5', BIT, nullable=False, default=0)
  348.     bSalePriceFree6 = Column('bSalePriceFree6', BIT, nullable=False, default=0)
  349.     bSalePriceFree7 = Column('bSalePriceFree7', BIT, nullable=False, default=0)
  350.     bSalePriceFree8 = Column('bSalePriceFree8', BIT, nullable=False, default=0)
  351.     bSalePriceFree9 = Column('bSalePriceFree9', BIT, nullable=False, default=0)
  352.     bSalePriceFree10 = Column('bSalePriceFree10', BIT, nullable=False, default=0)
  353.     fInvOutUpLimit = Column('fInvOutUpLimit', FLOAT, nullable=True, default=None)
  354.     bBondedInv = Column('bBondedInv', BIT, nullable=False, default=0)
  355.     bBatchCreate = Column('bBatchCreate', BIT, nullable=False, default=1)
  356.     bBatchProperty1 = Column('bBatchProperty1', BIT, nullable=False, default=1)
  357.     bBatchProperty2 = Column('bBatchProperty2', BIT, nullable=False, default=1)
  358.     bBatchProperty3 = Column('bBatchProperty3', BIT, nullable=False, default=0)
  359.     bBatchProperty4 = Column('bBatchProperty4', BIT, nullable=False, default=0)
  360.     bBatchProperty5 = Column('bBatchProperty5', BIT, nullable=False, default=0)
  361.     bBatchProperty6 = Column('bBatchProperty6', BIT, nullable=False, default=1)
  362.     bBatchProperty7 = Column('bBatchProperty7', BIT, nullable=False, default=1)
  363.     bBatchProperty8 = Column('bBatchProperty8', BIT, nullable=False, default=1)
  364.     bBatchProperty9 = Column('bBatchProperty9', BIT, nullable=False, default=1)
  365.     bBatchProperty10 = Column('bBatchProperty10', BIT, nullable=False, default=1)
  366.     bControlFreeRange1 = Column('bControlFreeRange1', BIT, nullable=False, default=0)
  367.     bControlFreeRange2 = Column('bControlFreeRange2', BIT, nullable=False, default=0)
  368.     bControlFreeRange3 = Column('bControlFreeRange3', BIT, nullable=False, default=0)
  369.     bControlFreeRange4 = Column('bControlFreeRange4', BIT, nullable=False, default=0)
  370.     bControlFreeRange5 = Column('bControlFreeRange5', BIT, nullable=False, default=0)
  371.     bControlFreeRange6 = Column('bControlFreeRange6', BIT, nullable=False, default=0)
  372.     bControlFreeRange7 = Column('bControlFreeRange7', BIT, nullable=False, default=0)
  373.     bControlFreeRange8 = Column('bControlFreeRange8', BIT, nullable=False, default=0)
  374.     bControlFreeRange9 = Column('bControlFreeRange9', BIT, nullable=False, default=0)
  375.     bControlFreeRange10 = Column('bControlFreeRange10', BIT, nullable=False, default=1)
  376.     fInvCIQExch = Column('fInvCIQExch', FLOAT, nullable=True, default=None)
  377.     iWarrantyPeriod = Column('iWarrantyPeriod', INTEGER, nullable=True, default=None)
  378.     iWarrantyUnit = Column('iWarrantyUnit', SMALLINT, nullable=False, default=0)
  379.     bInvKeyPart = Column('bInvKeyPart', BIT, nullable=False, default=1)
  380.     iAcceptEarlyDays = Column('iAcceptEarlyDays', INTEGER, nullable=False, default=0)
  381.     fProcessCost = Column('fProcessCost', FLOAT, nullable=True, default=None)
  382.     fCurLLaborCost = Column('fCurLLaborCost', FLOAT, nullable=True, default=None)
  383.     fCurLVarManuCost = Column('fCurLVarManuCost', FLOAT, nullable=True, default=None)
  384.     fCurLFixManuCost = Column('fCurLFixManuCost', FLOAT, nullable=True, default=None)
  385.     fCurLOMCost = Column('fCurLOMCost', FLOAT, nullable=True, default=None)
  386.     fNextLLaborCost = Column('fNextLLaborCost', FLOAT, nullable=True, default=None)
  387.     fNextLVarManuCost = Column('fNextLVarManuCost', FLOAT, nullable=True, default=None)
  388.     fNextLFixManuCost = Column('fNextLFixManuCost', FLOAT, nullable=True, default=None)
  389.     fNextLOMCost = Column('fNextLOMCost', FLOAT, nullable=True, default=None)
  390.     dInvCreateDatetime = Column('dInvCreateDatetime', DATETIME, nullable=False, default=func.getdate())
  391.     cInvAppDocNo = Column('cInvAppDocNo', NVARCHAR(50), nullable=True, default=None)
  392.     bPUQuota = Column('bPUQuota', BIT, nullable=False, default=0)
  393.     bInvROHS = Column('bInvROHS', BIT, nullable=False, default=0)
  394.     bPrjMat = Column('bPrjMat', BIT, nullable=False, default=0)
  395.     fPrjMatLimit = Column('fPrjMatLimit', DECIMAL(28, 6), nullable=True, default=None)
  396.     bInvAsset = Column('bInvAsset', BIT, nullable=False, default=0)
  397.     bSrvProduct = Column('bSrvProduct', BIT, nullable=False, default=0)
  398.     iAcceptDelayDays = Column('iAcceptDelayDays', INTEGER, nullable=False, default=0)
  399.     iPlanCheckDay = Column('iPlanCheckDay', INTEGER, nullable=True, default=None)
  400.     iMaterialsCycle = Column('iMaterialsCycle', INTEGER, nullable=True, default=None)
  401.     iDrawType = Column('iDrawType', SMALLINT, nullable=True, default=0)
  402.     bSCkeyProjections = Column('bSCkeyProjections', BIT, nullable=True, default=0)
  403.     iSupplyPeriodType = Column('iSupplyPeriodType', INTEGER, nullable=False, default=1)
  404.     iTimeBucketId = Column('iTimeBucketId', INTEGER, nullable=True, default=None)
  405.     iAvailabilityDate = Column('iAvailabilityDate', INTEGER, nullable=False, default=1)
  406.     fMaterialCost = Column('fMaterialCost', FLOAT, nullable=True, default=None)
  407.     bImport = Column('bImport', BIT, nullable=True, default=0)
  408.     iNearRejectDays = Column('iNearRejectDays', INTEGER, nullable=True, default=None)
  409.     bCheckSubitemCost = Column('bCheckSubitemCost', BIT, nullable=True, default=1)
  410.     fRoundFactor = Column('fRoundFactor', FLOAT, nullable=True, default=0)
  411.     bConsiderFreeStock = Column('bConsiderFreeStock', BIT, nullable=True, default=1)
  412.     bSuitRetail = Column('bSuitRetail', BIT, nullable=True, default=0)
  413.  
  414.  
  415. class InventoryExtraDefine(Base):
  416.     __tablename__ = 'Inventory_extradefine'
  417.  
  418.     cInvCode = Column('cInvCode', NVARCHAR(60), nullable=False, primary_key=True, autoincrement=False)
  419.     cidefine1 = Column('cidefine1', NVARCHAR(400), nullable=True, default=None)
  420.     cidefine2 = Column('cidefine2', NVARCHAR(60), nullable=True, default=None)
  421.     cidefine3 = Column('cidefine3', NVARCHAR(60), nullable=True, default=None)
  422.     cidefine4 = Column('cidefine4', NVARCHAR(60), nullable=True, default=None)
  423.     cidefine5 = Column('cidefine5', NVARCHAR(400), nullable=True, default=None)
  424.     cidefine6 = Column('cidefine6', NVARCHAR(50), nullable=True, default=None)
  425.     cidefine7 = Column('cidefine7', NVARCHAR(10), nullable=True, default=None)
  426.     cidefine8 = Column('cidefine8', NVARCHAR(120), nullable=True, default=None)
  427.     cidefine9 = Column('cidefine9', NVARCHAR(400), nullable=True, default=None)
  428.     cidefine10 = Column('cidefine10', NVARCHAR(400), nullable=True, default=None)
  429.     cidefine11 = Column('cidefine11', NVARCHAR(400), nullable=True, default=None)
  430.     cidefine12 = Column('cidefine12', NVARCHAR(400), nullable=True, default=None)
  431.     cidefine13 = Column('cidefine13', NVARCHAR(400), nullable=True, default=None)
  432.     cidefine14 = Column('cidefine14', NVARCHAR(400), nullable=True, default=None)
  433.     cidefine15 = Column('cidefine15', NVARCHAR(400), nullable=True, default=None)
  434.     cidefine16 = Column('cidefine16', NVARCHAR(400), nullable=True, default=None)
  435.     cidefine17 = Column('cidefine17', NVARCHAR(400), nullable=True, default=None)
  436.  
  437.  
  438. class Department(Base):
  439.     __tablename__ = "Department"
  440.  
  441.     cDepCode = Column('cDepCode', NVARCHAR(12), primary_key=True)
  442.     bDepEnd = Column('bDepEnd', BIT)
  443.     cDepName = Column('cDepName', NVARCHAR(255))
  444.     iDepGrade = Column('iDepGrade', TINYINT)
  445.     cDepPerson = Column('cDepPerson', NVARCHAR(20))
  446.     cDepProp = Column('cDepProp', NVARCHAR(10))
  447.     cDepPhone = Column('cDepPhone', NVARCHAR(100))
  448.     cDepAddress = Column('cDepAddress', NVARCHAR(255))
  449.     cDepMemo = Column('cDepMemo', NVARCHAR(20))
  450.     iCreLine = Column('iCreLine', FLOAT)
  451.     cCreGrade = Column('cCreGrade', NVARCHAR(20))
  452.     iCreDate = Column('iCreDate', INTEGER)
  453.     cOfferGrade = Column('cOfferGrade', NVARCHAR(20))
  454.     iOfferRate = Column('iOfferRate', FLOAT)
  455.     pubufts = Column('pubufts', TIMESTAMP)
  456.     bShop = Column('bShop', BIT)
  457.     cDepGUID = Column('cDepGUID', UNIQUEIDENTIFIER)
  458.     dDepBeginDate = Column('dDepBeginDate', DATETIME)
  459.     dDepEndDate = Column('dDepEndDate', DATETIME)
  460.     vAuthorizeDoc = Column('vAuthorizeDoc', NVARCHAR(50))
  461.     vAuthorizeUnit = Column('vAuthorizeUnit', NVARCHAR(100))
  462.     cDepFax = Column('cDepFax', NVARCHAR(20))
  463.     cDepPostCode = Column('cDepPostCode', NVARCHAR(6))
  464.     cDepEmail = Column('cDepEmail', NVARCHAR(100))
  465.     cDepType = Column('cDepType', NVARCHAR(20))
  466.     bInheritDutyBasic = Column('bInheritDutyBasic', INTEGER)
  467.     bInheritWorkCalendar = Column('bInheritWorkCalendar', INTEGER)
  468.     cDutyCode = Column('cDutyCode', NVARCHAR(50))
  469.     cRestCode = Column('cRestCode', NVARCHAR(50))
  470.     bIM = Column('bIM', BIT)
  471.     cDepNameEn = Column('cDepNameEn', NVARCHAR(255))
  472.     bRetail = Column('bRetail', BIT)
  473.     cDepFullName = Column('cDepFullName', NVARCHAR(800))
  474.     iDepOrder = Column('iDepOrder', INTEGER)
  475.     cDepLeader = Column('cDepLeader', NVARCHAR(20))
  476.     dModifyDate = Column('dModifyDate', DATETIME)
  477.     cESpaceMembID = Column('cESpaceMembID', NVARCHAR(50))
  478.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement