| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- namespace addons\CloudStock\common\models;
- use common\models\base\BaseActiveRecord;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_cloud_stock_order_batch_delivery".
- *
- * @property int $id ID
- * @property int $mall_id 商城ID
- * @property int $operator_id 操作人ID
- * @property string $operator_name 操作人昵称
- * @property string $delivery_file 批量发货文件地址
- * @property int $express_id 快递公司id
- * @property string $express_name 物流公司名称
- * @property int $delivery_num 发货单数
- * @property int $success_delivery_num 成功发货单数
- * @property int $delivery_status 批量发货状态【0:处理中,1:已完成】
- * @property int $status 状态【1启用 0禁用 -1删除】
- * @property int $created_at 创建时间
- * @property int $updated_at 更新时间
- */
- class CloudStockOrderBatchDelivery extends BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_cloud_stock_order_batch_delivery';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'operator_id', 'express_id', 'delivery_num', 'success_delivery_num', 'delivery_status', 'status', 'created_at', 'updated_at'], 'integer'],
- [['operator_name', 'express_name'], 'string', 'max' => 100],
- [['delivery_file'], 'string', 'max' => 500],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'operator_id' => 'Operator ID',
- 'operator_name' => 'Operator Name',
- 'delivery_file' => 'Delivery File',
- 'express_id' => 'Express ID',
- 'express_name' => 'Express Name',
- 'delivery_num' => 'Delivery Num',
- 'success_delivery_num' => 'Success Delivery Num',
- 'delivery_status' => 'Delivery Status',
- 'status' => 'Status',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- ];
- }
- public static function setData($mall_id, $params)
- {
- try {
- $mobel = new self();
- $mobel->mall_id = $mall_id;
- if (!$mobel->load($params, '') || !$mobel->save()) throw new \Exception($mobel->getErrorMessage());
- return $mobel;
- } catch (\Exception $e) {
- self::setStaticError($e->getMessage());
- return false;
- }
- }
- }
|