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.

57 lines
2.2 KiB

package goods
//type RecookGoodsInvoiceModel struct {
// db.BaseModel
// Id uint `gorm:"column:id;primary_key" json:"id"`
// GoodsId uint `json:"goodsId"`
// GoodsName string `json:"goodsName"`
// TaxSn string `json:"taxSn"`
// TaxName string `json:"taxName"`
// Unit string `json:"unit"`
// TaxRate decimal.Decimal `json:"taxRate"`
// PlatformRate decimal.Decimal `json:"platformRate"`
// DeductionRate decimal.Decimal `json:"deduction_rate"`
// CreatedAt formatime.Second `gorm:"column:created_at" json:"createAt"`
// UpdatedAt formatime.Second `gorm:"column:updated_at" json:"updatedAt"`
//}
//
//func (r *RecookGoodsInvoiceModel) TableName() string {
// return "recook_goods_invoice"
//}
//
//func (r *RecookGoodsInvoiceModel) Create(data *RecookGoodsInvoiceModel) {
// r.GetDb().Create(data)
//}
//
//func (r *RecookGoodsInvoiceModel) DeleteByGoodsId(goodsId uint) int64 {
// return r.GetDb().Delete(&RecookGoodsInvoiceModel{}, "goods_id = ?", goodsId).RowsAffected
//}
//
//func (r *RecookGoodsInvoiceModel) UpdateByGoodsId(goodsId uint, data *RecookGoodsInvoiceModel) int64 {
// return r.GetDb().Model(&RecookGoodsInvoiceModel{}).Where("goods_id = ?", goodsId).Update(data).RowsAffected
//}
//
//func (r *RecookGoodsInvoiceModel) FindByGoodsId(goodsId uint) (result RecookGoodsInvoiceModel) {
// if goodsId == 0 {
// return RecookGoodsInvoiceModel{}
// }
// r.GetDb().First(&result, "goods_id = ?", goodsId)
// return
//}
//
//func (r *RecookGoodsInvoiceModel) FindByGoodsIds(goodsIds []uint) (result []RecookGoodsInvoiceModel) {
// if len(goodsIds) == 0 {
// return []RecookGoodsInvoiceModel{}
// }
// r.GetDb().Model(&RecookGoodsInvoiceModel{}).Find(&result, "goods_id in (?)", goodsIds)
// return
//}
//
//func (r *RecookGoodsInvoiceModel) Update(data *RecookGoodsInvoiceModel, query interface{}, args ...interface{}) int64 {
// return r.GetDb().Model(&RecookGoodsInvoiceModel{}).Where(query, args...).Update(data).RowsAffected
//}
//
//func (r *RecookGoodsInvoiceModel) UpdateColumn(attr, value, query interface{}, args ...interface{}) error {
// return r.GetDb().Model(&RecookGoodsInvoiceModel{}).Where(query, args...).UpdateColumn(attr, value).Error
//}