| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace App\Model;
- use Illuminate\Database\Eloquent\Model;
- class SyncTempRecord extends Model
- {
- protected $guarded = [];
- protected $table = "sync_temp_records"; //指定表
- const CREATED_AT = 'crt_time';
- const UPDATED_AT = 'upd_time';
- protected $dateFormat = 'U';
- const opt_zero = 0; // 新增
- const opt_one = 1; // 修改
- const opt_two = 2; // 删除
- // 3. 构建操作类型映射
- public static $opMapping = [
- self::opt_zero => 'C',
- self::opt_one => 'U',
- self::opt_two => 'D',
- ];
- const status_zero = 0;
- const status_one = 1;
- const status_two = 2;
- const type_one = 'purchaseArrival'; // 采购到货单 0 | 采购退货单 1
- const type_two = 'materialRequest'; //领料申请单
- const type_three = 'productBj'; // 产品报检单
- const type_four = 'salesOrder'; // 销售订单
- const type_five = 'other_in';// 其他入
- const type_six = 'salesReturn';//销售退货单
- const type_seven = 'other_out';//其他出
- const type_eight = 'in_check';//在库检验
- public static $settle_type = [
- self::type_one => 'one',
- self::type_two => 'two',
- self::type_three => 'three',
- self::type_four => 'four',
- self::type_five => 'five',
- self::type_six => 'six',
- self::type_seven => 'seven',
- self::type_eight => 'eight',
- ];
- public static $map = [
- self::type_one => [
- 0 => 'PR_IN', // 采购到货
- 1 => 'PR_OUT',// 采购退货
- ],
- self::type_two => 'PK_OUT', // 领料申请单
- self::type_three => 'WIP_IN', // 产品报检单
- self::type_four => 'FG_OUT', // 销售订单
- self::type_five => 'MS_IN', // 其他入
- self::type_six => 'IV_ADJ', // 销售退货
- self::type_seven => 'MS_OUT', // 其他出
- self::type_eight => 'U8_check', // 检验单
- ];
- }
|