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.

97 lines
2.0 KiB

  1. <?php
  2. declare (strict_types=1);
  3. namespace App\Model;
  4. /**
  5. */
  6. class FinancialRecord extends Model
  7. {
  8. /**
  9. * 当面付商户首单奖励限制的订单金额
  10. */
  11. const OFL_FIRST_AWARD_LIMIT_AMOUNT = 3;
  12. /**
  13. * 虚拟账户
  14. */
  15. const ACCOUNT_LEDGER = -1;
  16. /**
  17. * 账户类型
  18. *
  19. * 总账
  20. * USER_TYPE_LEDGER / -1
  21. *
  22. * 用户/商户账户
  23. * USER_TYPE_USER / 1
  24. *
  25. * MP用户账户,服务商、市场经理、服务站点等
  26. * USER_TYPE_MP / 2
  27. */
  28. const USER_TYPE_LEDGER = -1;
  29. const USER_TYPE_USER = 1;
  30. const USER_TYPE_MP = 2;
  31. /**
  32. * 关联类型
  33. *
  34. * 订单
  35. * SOURCE_TYPE_ORDER / 1
  36. */
  37. const SOURCE_TYPE_ORDER = 1;
  38. /**
  39. * 流水类型,大的分类,<=50是奖励,>50是分账
  40. *
  41. * MONEY_TYPE_PLAT_NEW_USER
  42. * 社区服务点新用户奖励(线上订单完成) / 1
  43. *
  44. * MONEY_TYPE_FIRST_ORDER
  45. * 社区服务点新用户线上首单奖励(线上订单完成) / 2
  46. *
  47. * MONEY_TYPE_OL_ORDER
  48. * 社区服务点用户线上订单分账(线上订单完成) / 51
  49. */
  50. const MONEY_TYPE_PLAT_NEW_USER = 1;
  51. const MONEY_TYPE_FIRST_ORDER = 2;
  52. const MONEY_TYPE_OL_ORDER = 3;
  53. const MONEY_TYPE_STORE_PLAT_NEW_USER = 4;
  54. const MONEY_TYPE_STORE_FIRST_ORDER = 5;
  55. const MONEY_TYPE_USER_OFL_ORDER = 100;
  56. const MONEY_TYPE_USER_OL_ORDER = 101;
  57. /**
  58. * 状态
  59. */
  60. const STATUS_NORMAL = 1;
  61. const STATUS_ABNORMAL = 2;
  62. /**
  63. * The table associated with the model.
  64. *
  65. * @var string
  66. */
  67. protected $table = 'lanzu_financial_record';
  68. /**
  69. * The attributes that are mass assignable.
  70. *
  71. * @var array
  72. */
  73. protected $fillable = [
  74. 'user_id',
  75. 'user_type',
  76. 'money',
  77. 'money_type',
  78. 'source_id',
  79. 'source_type',
  80. 'desc',
  81. 'comment',
  82. 'status',
  83. ];
  84. /**
  85. * The attributes that should be cast to native types.
  86. *
  87. * @var array
  88. */
  89. protected $casts = [];
  90. }