# -*- coding: utf-8 -*- """ models.StockListModel ~~~~~~~~~~~~~~ 库存实体. :copyright: 云南新八达科技有限公司. :author: 李进才. """ import json from utils.List2Json import * class StockListModel(object): Id = None StockId = None Name = None Code = None Position = None Number = None LastNumber = None InTime = None Specification = None Expiration = None Maker = None SupplierName = None CertificationCode = None ProductionBatch = None UnitPrice = None SellingPrice = None VerifyPeople = None TypeName = None Unit = None Ratio = None SmallestUnit = None def __init__(self, Id, Name, StockId, Code, Position, Number, LastNumber, InTime, Specification, Expiration, Maker, SupplierName, CertificationCode, ProductionBatch, UnitPrice, SellingPrice, VerifyPeople, TypeName, Unit, Ratio, SmallestUnit): self.Id = Id self.StockId = StockId self.Name = Name self.Code = Code self.Position = Position self.Number = Number self.LastNumber = LastNumber self.InTime = InTime self.Specification = Specification self.Expiration = Expiration self.Maker = Maker self.SupplierName = SupplierName self.CertificationCode = CertificationCode self.ProductionBatch = ProductionBatch self.UnitPrice = UnitPrice self.SellingPrice = SellingPrice self.VerifyPeople = VerifyPeople self.TypeName = TypeName self.Unit = Unit self.Ratio = Ratio self.SmallestUnit = SmallestUnit def value(self): """ StockListModel json data :return: json data """ return '{"ID":"' + str(self.Id) + '","StockId":"' + str(self.StockId) + '","Name":"' + self.Name + '","Code":"' + self.Code + '","Position":"' + self.Position + '","Number":"' + \ str(self.Number) + '","LastNumber":"' + str(self.LastNumber) + '","InTime":"' + str(self.InTime) + '","Specification":"' + \ self.Specification + '","Expiration":"' + str(self.Expiration) + '","Maker":"' + self.Maker + '","SupplierName":"' + \ self.SupplierName + '","CertificationCode":"' + self.CertificationCode + '","ProductionBatch":"' + \ self.ProductionBatch + '","UnitPrice":"' + str(self.UnitPrice) + '","SellingPrice":"' + \ str(self.SellingPrice) + '","VerifyPeople":"' + self.VerifyPeople +\ '","Unit":"' + str(self.Unit) + '","TypeName":"' + \ self.TypeName + '","Ratio":"' + str(self.Ratio) + '","SmallestUnit":"' + str(self.SmallestUnit) + '"}'