You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
508 B
16 lines
508 B
#商品实体类
|
|
class commodity:
|
|
def __init__(self, com_code, com_name, com_price, com_stock):
|
|
self.com_code = com_code #编号
|
|
self.com_name = com_name #名称
|
|
self.com_price = com_price #价格
|
|
self.com_stock = com_stock #库存
|
|
|
|
def get_commodity(self):
|
|
com_dict = {
|
|
'com_code':self.com_code,
|
|
'com_name':self.com_name,
|
|
'com_price':self.com_price,
|
|
'com_stock':self.com_stock,
|
|
}
|
|
return com_dict |