| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <?php
- /**
- * MdSetting.php
- * 门店设置信息表
- * Created on 2024/3/18 14:12
- * @author: hankaige
- */
- namespace app\models;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%md_setting}}".
- * @property integer $id
- * @property integer $store_id
- * @property integer $change_shop
- * @property integer $pay_wechat
- * @property integer $pay_alipay
- * @property integer $pay_bank
- * @property integer $pay_remaining
- * @property float $min_money
- * @property float $cash_max_day
- * @property float $cash_max_single_day
- * @property float $cash_service_charge
- * @property integer $created_at
- * @property integer $updated_at
- * @property integer $is_delete
- */
- class MdSetting extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%md_setting}}';
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
- ]
- ]
- ];
- }
- public function rules()
- {
- return [
- [
- ['store_id'],
- 'required'
- ],
- [
- [
- 'store_id',
- 'change_shop',
- 'pay_wechat',
- 'pay_alipay',
- 'pay_bank',
- 'pay_remaining',
- 'created_at',
- 'updated_at',
- 'is_delete'
- ],
- 'integer'
- ],
- [
- [
- 'pay_alipay',
- 'pay_bank',
- 'pay_remaining',
- 'updated_at',
- 'is_delete'
- ],
- 'default',
- 'value' => 0
- ],
- [
- [
- 'pay_wechat',
- 'change_shop'
- ],
- 'default',
- 'value' => 1
- ],
- [
- [
- 'min_money',
- 'cash_max_day',
- 'cash_max_single_day',
- 'cash_service_charge'
- ],
- 'number'
- ],
- [
- [
- 'min_money',
- 'cash_max_day',
- 'cash_max_single_day',
- 'cash_service_charge'
- ],
- 'default',
- 'value' => 0
- ]
- ];
- }
- public function attributeLabels()
- {
- return [
- 'store_id' => '商城ID',
- 'change_shop' => '门店切换',
- 'pay_wechat' => '微信提现',
- 'pay_alipay' => '支付宝提现',
- 'pay_bank' => '银行卡提现',
- 'pay_remaining' => '余额提现',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'is_delete' => '删除时间',
- 'min_money' => '每次最小提现金额',
- 'cash_max_day' => '每天提现金额',
- 'cash_max_single_day' => '没人单日提现金额',
- 'cash_service_charge' => '提现手续费'
- ];
- }
- }
|