ProductBatchProcessSheet.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 ProductBatchProcessForm
  13. * @package app\plugins\product_traceability\models
  14. * @property integer $id
  15. * @property integer $store_id
  16. * @property integer $product_batch_process_id
  17. * @property string $name
  18. * @property string $type
  19. * @property integer $required
  20. * @property string $default
  21. * @property string $tip
  22. * @property integer $sort
  23. * @property integer $is_delete
  24. * @property string $created_at
  25. * @property string $updated_at
  26. */
  27. class ProductBatchProcessSheet extends ActiveRecord
  28. {
  29. public function behaviors()
  30. {
  31. return [
  32. [
  33. // 自动更新创建和更新时间
  34. 'class' => TimestampBehavior::class,
  35. 'value' => time()
  36. ]
  37. ];
  38. }
  39. public static function tableName()
  40. {
  41. return '{{%product_batch_process_sheet}}';
  42. }
  43. public function rules()
  44. {
  45. return [
  46. [['store_id', 'product_batch_process_id', 'required', 'sort' ], 'required'],
  47. [['store_id', 'created_at', 'updated_at', 'is_delete', 'product_batch_process_id', 'required', 'sort'], 'integer'],
  48. [['name', 'type', 'default', 'tip'], 'string', 'max' => 255],
  49. ];
  50. }
  51. public function attributeLabels()
  52. {
  53. return [
  54. 'id' => 'ID',
  55. 'store_id' => '商城id',
  56. 'product_batch_process_id' => '流程id',
  57. 'name' => '名称',
  58. 'type' => '类型',
  59. 'required' => '必填项',
  60. 'default' => '默认值',
  61. 'tip' => '提示语',
  62. 'sort' => '排序',
  63. 'created_at' => '创建时间',
  64. 'updated_at' => '更新时间',
  65. 'is_delete' => 'Is Delete',
  66. ];
  67. }
  68. }