feat:depotPurchase
This commit is contained in:
@@ -36,13 +36,16 @@ class MaterialStock extends Model
|
||||
*/
|
||||
protected array $casts = ['id' => 'integer', 'material_id' => 'integer', 'depot_id' => 'integer', 'supplier_id' => 'integer', 'is_del' => 'integer'];
|
||||
|
||||
const CREATED_AT = 'create_time';
|
||||
|
||||
const UPDATED_AT = 'update_time';
|
||||
|
||||
public function getMaterial(int $material_id,int $depot_id,int $supplier_id): \Hyperf\Database\Model\Model|Builder|null
|
||||
{
|
||||
return $this->where('is_del',MaterialCode::IS_NO_DEL)
|
||||
->where('material_id',$material_id)
|
||||
->where('depot_id',$depot_id)
|
||||
->where('supplier_id',$supplier_id)
|
||||
->where('is_del',MaterialCode::IS_NO_DEL)
|
||||
->first();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user