StoreSync.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * Class StoreSync
  12. * @package app\modules\common\models
  13. *
  14. * @property integer $id
  15. * @property integer $from_store_id
  16. * @property string $to_store_ids
  17. * @property integer $status
  18. * @property string $created_at
  19. * @property string $updated_at
  20. * @property integer $is_delete
  21. * @property integer $result
  22. * @property string $imports
  23. */
  24. class StoreSync extends ActiveRecord
  25. {
  26. public static function tableName()
  27. {
  28. return '{{%store_sync}}';
  29. }
  30. public function behaviors()
  31. {
  32. return [
  33. [
  34. // 自动更新创建和更新时间
  35. 'class' => TimestampBehavior::class,
  36. 'value' => time()
  37. ]
  38. ];
  39. }
  40. public function rules()
  41. {
  42. return [
  43. [['is_delete', 'from_store_id', 'status', 'is_delete', 'result'], 'integer'],
  44. [['to_store_ids', 'imports'], 'string'],
  45. [['create_at', 'update_at'], 'safe'],
  46. ];
  47. }
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'id' => 'ID',
  52. 'from_store_id' => '来源商城',
  53. 'to_store_ids' => '同步到商城,多个',
  54. 'status' => '状态, 0:未运行, 1:运行中, 2:排队中',
  55. 'create_at' => '创建时间',
  56. 'update_at' => '更新时间',
  57. 'is_delete' => '是否已删除',
  58. 'result' => '0:从未执行,1:执行成功, 2:执行失败',
  59. 'imports' => '导入的配置信息'
  60. ];
  61. }
  62. }