ProductBatchProcessLog.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 ProductBatchProcessLog
  13. * @package app\plugins\product_traceability\models
  14. * @property integer $id
  15. * @property integer $store_id
  16. * @property integer $product_id
  17. * @property integer $product_batch_id
  18. * @property integer $product_batch_process_id
  19. * @property integer $state
  20. * @property integer $is_delete
  21. * @property string $created_at
  22. * @property string $updated_at
  23. */
  24. class ProductBatchProcessLog 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_log}}';
  39. }
  40. public function rules()
  41. {
  42. return [
  43. [['store_id', 'product_id', 'product_batch_id', 'product_batch_process_id' ], 'required'],
  44. [['store_id', 'created_at', 'updated_at', 'is_delete', 'product_id', 'product_batch_id', 'product_batch_process_id', 'state' ], 'integer'],
  45. ];
  46. }
  47. public function attributeLabels()
  48. {
  49. return [
  50. 'id' => 'ID',
  51. 'store_id' => '商城id',
  52. 'product_id' => '产品id',
  53. 'product_batch_id' => '批次id',
  54. 'product_batch_process_id' => '批次流程id',
  55. 'state' => '状态 0-未提交 1-已提交',
  56. 'created_at' => '创建时间',
  57. 'updated_at' => '更新时间',
  58. 'is_delete' => 'Is Delete',
  59. ];
  60. }
  61. }