| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\db\ActiveRecord;
- use yii\behaviors\TimestampBehavior;
- /**
- * Class StoreSync
- * @package app\modules\common\models
- *
- * @property integer $id
- * @property integer $from_store_id
- * @property integer $to_store_id
- * @property integer $batch_id
- * @property integer $status
- * @property string $created_at
- * @property string $updated_at
- * @property integer $is_delete
- * @property integer $result
- * @property string $imports
- */
- class StoreSyncLock extends ActiveRecord
- {
- public static function tableName()
- {
- return '{{%store_sync_lock}}';
- }
- public function behaviors()
- {
- return [
- [
- // 自动更新创建和更新时间
- 'class' => TimestampBehavior::class,
- 'value' => time()
- ]
- ];
- }
- public function rules()
- {
- return [
- [['is_delete', 'from_store_id', 'status', 'is_delete', 'result', 'to_store_id', 'batch_id'], 'integer'],
- [['imports'], 'string'],
- [['create_at', 'update_at'], 'safe'],
- ];
- }
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'from_store_id' => '来源商城',
- 'to_store_id' => '需要同步的商城',
- 'batch_id' => '批次id',
- 'status' => '状态, 0:未运行, 1:运行中, 2:排队中',
- 'create_at' => '创建时间',
- 'update_at' => '更新时间',
- 'is_delete' => '是否已删除',
- 'result' => '0:从未执行,1:执行成功, 2:执行失败',
- 'imports' => '导入的配置信息'
- ];
- }
- }
|