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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
module . exports = function ( db , callback ) {
// 用户模型
db . define ( "GoodModel" , {
goods _id : { type : 'serial' , key : true } ,
cat _id : Number ,
goods _name : String ,
goods _price : Number ,
goods _number : Number ,
goods _weight : Number ,
goods _introduce : String ,
goods _big _logo : String ,
goods _small _logo : String ,
goods _state : Number , // 0: 未审核 1: 审核中 2: 已审核
is _del : [ '0' , '1' ] , // 0: 正常 , 1: 删除
add _time : Number ,
upd _time : Number ,
delete _time : Number ,
hot _mumber : Number ,
is _promote : Boolean ,
cat _one _id : Number ,
cat _two _id : Number ,
cat _three _id : Number
} , {
table : "sp_goods" ,
methods : {
getGoodsCat : function ( ) {
return this . cat _one _id + ',' + this . cat _two _id + ',' + this . cat _three _id ;
}
}
} ) ;
return callback ( ) ;
}