diff --git a/doc/_common.py b/doc/_common.py index f3b96059..6ee56341 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -203,6 +203,7 @@ class Item(object): ['item_uniid', 0, '道具唯一id'], ['item_id', 0, '道具id'], ['item_num', 0, '道具数量'], + ['durability', 0, '耐久'], ['!attr', [Attr()], '属性'], ] diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 17b051d2..915fbc56 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -141,6 +141,7 @@ CREATE TABLE `t_bag` ( `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', `item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id', `item_num` int(11) NOT NULL DEFAULT '0' COMMENT '数量', + `durability` int(11) NOT NULL DEFAULT '0' COMMENT '耐久', `rand_attr` mediumblob COMMENT '随机属性', `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', diff --git a/webapp/models/Bag.php b/webapp/models/Bag.php index 9ed0a12f..e27ae235 100644 --- a/webapp/models/Bag.php +++ b/webapp/models/Bag.php @@ -62,6 +62,7 @@ class Bag extends BaseModel { 'item_uniid' => $row['idx'], 'item_id' => $row['item_id'], 'item_num' => $row['item_num'], + 'durability' => $row['durability'], 'attr' => emptyReplace(json_decode($row['rand_attr'], true), array()), ); }