| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%printer}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $supplier_id
- * @property integer $mch_id
- * @property string $name
- * @property string $printer_type
- * @property string $printer_setting
- * @property integer $is_delete
- * @property integer $created_at
- * @property integer $updated_at
- * @property integer $md_id
- * @property integer $type
- */
- class Printer extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%printer}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'mch_id', 'is_delete', 'created_at', 'updated_at', 'md_id', 'supplier_id', 'type'], 'integer'],
- [['printer_setting'], 'string'],
- [['name', 'printer_type'], 'string', 'max' => 255],
- ['mch_id', 'default', 'value' => 0]
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
- ]
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'mch_id' => '商户主键',
- 'name' => '打印机名称',
- 'printer_type' => '打印机类型',
- 'printer_setting' => '打印机设置',
- 'is_delete' => 'Is Delete',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- 'md_id' => "门店id",
- 'supplier_id' => '供货商id',
- 'type' => '类型'
- ];
- }
- }
|