tongyioil_aftersale_items
售后单明细表
所属应用: tongyioil
表结构
| ColumnName | Comment | Type | Not null | Default | Autoincrement |
|---|---|---|---|---|---|
| id | id | int(10) unsigned | Y | Y | |
| aftersale_id | 关联售后单ID | int(10) unsigned | N | N | |
| at_time | 创建时间 | TIMESTAMP | N | CURRENT_TIMESTAMP | N |
| up_time | 更新时间 | TIMESTAMP | N | CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | N |
| original_item_id | 来源ID | int(10) unsigned | N | N | |
| obj_item_id | 订单行ID | int(10) unsigned | N | N | |
| order_item_id | 订单明细ID | int(10) unsigned | N | N | |
| bn | 货号 | varchar(200) | N | N | |
| product_id | 货品ID | varchar(200) | N | N | |
| product_name | 货品名称 | varchar(200) | N | N | |
| num | 退货入库数量 | int(10) unsigned | N | 1 | N |
| branch_id | 仓库ID | int(10) unsigned | N | N | |
| branch_name | 仓库名称 | varchar(200) | N | N | |
| branch_bn | 仓库编号 | varchar(32) | N | N | |
| return_type | 售后类型 return:退货;change:换货;refunded:退款;refuse:追回; | enum('return','change','refunded','refuse') | N | return | N |
| item_type | 物料类型 | varchar(50) | N | product | N |
| sales_material_bn | 销售物料编码 | varchar(50) | N | N | |
| oid | 子订单号 | varchar(50) | N | N | |
| purchase_price | 采购价 | decimal(20,3) | N | 0 | N |
| purchase_amount | 采购小计 | decimal(20,3) | N | 0 | N |
| price | 零售价 | decimal(20,3) | N | 0 | N |
| amount | 零售小计 | decimal(20,3) | N | N | |
| actually_amount | 客户实付 | decimal(20,3) | N | N | |
| platform_total_amount | 平台承担金额 | decimal(20,3) | N | 0 | N |
| platform_amount | 平台承担金额(不包含支付优惠) | decimal(20,3) | N | 0 | N |
| platform_pay_amount | 支付优惠金额 | decimal(20,3) | N | 0 | N |
| settlement_amount | 结算金额 | decimal(20,3) | N | 0 | N |
| discount | 商家优惠 | decimal(20,3) | N | 0 | N |
| unit | 包装单位 | varchar(20) | N | N | |
| platform_amount_detail | 平台承担明细JSON格式 | text | N | N |
索引
| Key name | Column names | Unique | Comment |
|---|---|---|---|
| primary | id | Y | |
| ind_at_time | at_time | N | |
| ind_up_time | up_time | N | |
| ind_aftersale_id | aftersale_id | N | |
| ind_original_item_id | original_item_id | Y | |
| ind_obj_item_id | obj_item_id | N | |
| ind_order_item_id | order_item_id | N | |
| ind_bn | bn | N | |
| ind_branch_id | branch_id | N | |
| ind_branch_bn | branch_bn | N | |
| ind_return_type | return_type | N | |
| ind_item_type | item_type | N | |
| ind_sales_material_bn | sales_material_bn | N | |
| ind_oid | oid | N |
