Product.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace App\Model;
  3. class Product extends UseScopeBaseModel
  4. {
  5. protected $table = "product"; //指定表
  6. const CREATED_AT = 'crt_time';
  7. const UPDATED_AT = 'upd_time';
  8. protected $dateFormat = 'U';
  9. const State_zero = 0;
  10. const State_one = 1;
  11. const State_two = 2;
  12. public static $state = [
  13. self::State_zero => '新增',
  14. self::State_one => '上架',
  15. self::State_two => '下架',
  16. ];
  17. const range_function = 'productRangeNot';
  18. const Product_attribute_zero = 0;
  19. const Product_attribute_one = 1;
  20. const Product_attribute_two = 2;
  21. const Product_attribute_three = 3;
  22. const Product_attribute_four = 4;
  23. const Product_attribute_five = 5;
  24. const Product_attribute_six = 6;
  25. public static $product_attribute = [
  26. self::Product_attribute_zero => '无',
  27. self::Product_attribute_one => '其他',
  28. self::Product_attribute_two => '主推款',
  29. self::Product_attribute_three => '严选',
  30. self::Product_attribute_four => '热门畅销',
  31. self::Product_attribute_five => 'NEW',
  32. self::Product_attribute_six => '含税产品',
  33. ];
  34. public static $product_attribute_color = [
  35. self::Product_attribute_zero => [
  36. 'background_color' => 'white',
  37. 'font_color' => 'black',
  38. ],
  39. self::Product_attribute_one => [
  40. 'background_color' => 'white',
  41. 'font_color' => 'black',
  42. ],
  43. self::Product_attribute_two => [
  44. 'background_color' => 'white',
  45. 'font_color' => 'black',
  46. ],
  47. self::Product_attribute_three => [
  48. 'background_color' => 'white',
  49. 'font_color' => 'black',
  50. ],
  51. ];
  52. const is_use_zero = 0;
  53. const is_use_one = 1;
  54. public static $is_use = [
  55. self::is_use_zero => '停用',
  56. self::is_use_one => '启用',
  57. ];
  58. }