123456789101112131415161718192021222324252627282930 |
- <?php
- namespace app\cxinv\model;
- class ProductOnlog extends Base
- {
- //设置字段信息
- protected $schema = [
- 'id' =>'bigint',//
- "type"=>'tinyint',// 1入账 2 出账 3 盘盈 4盘亏 5计提入库 6计提出库 7 取消数据入库 8 取消数据出库
- 'order_item_id' =>'bigint',//关联明细采购单id 盘点id
- 'product_id' =>'bigint',//商品id
- 'first_on_time' =>'datetime',//第一次入账
- 'on_time' =>'datetime',//入账时间
- "fz_date"=>'varchar',
- 'num' =>'decimal',//入账数量
- 'unit_price' =>'decimal',//单价
- 'rate' =>'varchar',//税率
- 'apply_id' =>'int',//
- 'apply_name' =>'varchar',//
- 'create_time' =>'datetime',//
- ];
- protected $createTime = 'create_time';
- public function Product(){
- return $this->belongsTo(FinancialProducts::class,'product_id','id')->bind(['goodName','skuCode']);
- }
- public function OrderItem(){
- return $this->belongsTo(FinancialManager::class,'order_item_id','id');
- }
- }
|