| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- namespace addons\QiShangTong\common\models;
- use common\models\mall\Mall;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_qi_shang_tong_balance_log".
- *
- * @property int $id ID
- * @property int $mall_id 商城ID
- * @property int $created_at 创建时间
- * @property int $updated_at 更新时间
- * @property int $status 状态
- * @property int $amount 异动金额
- * @property int $before_amount 异动金额
- * @property int $after_amount 异动金额
- * @property string $remark 异动备注
- * @property int $type 异动类型
- * @property int $direction 1进2出
- * @property string $order_no 订单编号
- * @property string $addons 订单编号
- */
- class QiShangTongBalanceLog extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_qi_shang_tong_balance_log';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'created_at', 'updated_at', 'status', 'amount', 'type', 'direction', 'before_amount', 'after_amount'], 'integer'],
- [['remark'], 'string', 'max' => 1000],
- [['order_no'], 'string', 'max' => 30],
- [['addons'], 'string', 'max' => 50],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- 'status' => 'Status',
- 'amount' => 'Amount',
- 'remark' => 'Remark',
- 'type' => 'Type',
- 'direction' => 'Direction',
- 'order_no' => 'Order No',
- ];
- }
- public function getMall()
- {
- return $this->hasOne(Mall::class, ['id' => 'mall_id']);
- }
- }
|