ProductBatchProcess.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\plugins\product_traceability\models;
  8. use yii\behaviors\TimestampBehavior;
  9. use yii\db\ActiveRecord;
  10. /**
  11. *
  12. * Class ProductBatchProcess
  13. * @package app\plugins\product_traceability\models
  14. * @property integer $id
  15. * @property integer $store_id
  16. * @property string $process_name
  17. * @property integer $process_user_id
  18. * @property integer $product_batch_id
  19. * @property integer $is_delete
  20. * @property string $created_at
  21. * @property string $updated_at
  22. * @property string $sort
  23. */
  24. class ProductBatchProcess extends ActiveRecord
  25. {
  26. public function behaviors()
  27. {
  28. return [
  29. [
  30. // 自动更新创建和更新时间
  31. 'class' => TimestampBehavior::class,
  32. 'value' => time()
  33. ]
  34. ];
  35. }
  36. public static function tableName()
  37. {
  38. return '{{%product_batch_process}}';
  39. }
  40. public function rules()
  41. {
  42. return [
  43. [['store_id', 'process_name', 'process_user_id', 'product_batch_id', ], 'required'],
  44. [['store_id', 'created_at', 'updated_at', 'is_delete', 'product_batch_id', 'sort'], 'integer'],
  45. [['process_name',], 'string', 'max' => 255],
  46. ];
  47. }
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'id' => 'ID',
  52. 'store_id' => '商城id',
  53. 'process_name' => '流程名称',
  54. 'process_user_id' => '流程操作用户',
  55. 'product_batch_id' => '批次id',
  56. 'created_at' => '创建时间',
  57. 'updated_at' => '更新时间',
  58. 'is_delete' => 'Is Delete',
  59. 'sort' => 'sort',
  60. ];
  61. }
  62. }