| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- /**
- * This is the model class for table "{{%alliance_coupon_settle_detail}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $order_id
- * @property integer $settle_id
- * @property string $price
- * @property string $take_price
- * @property string $rl_rate
- * @property integer $order_type
- * @property string $created_at
- * @property string $updated_at
- */
- class AllianceCouponSettleDetail extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%alliance_coupon_settle_detail}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [[ 'store_id','order_type','settle_id', 'order_id'], 'integer'],
- [['price','take_price','rl_rate'], 'number'],
- [['updated_at', 'created_at'], 'string'],
- ];
- }
- public function beforeSave($insert)
- {
- if (parent::beforeSave($insert)) {
- if ($this->isNewRecord) {
- $this->created_at = date('Y-m-d H:i:s');
- }else{
- $this->updated_at = date('Y-m-d H:i:s');
- }
- return true;
- }
- return false;
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- ];
- }
- }
|