PrinterSetting.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * This is the model class for table "{{%printer_setting}}".
  12. *
  13. * @property integer $id
  14. * @property integer $store_id
  15. * @property integer $mch_id
  16. * @property integer $printer_id
  17. * @property integer $block_id
  18. * @property string $type
  19. * @property integer $is_delete
  20. * @property integer $is_attr
  21. * @property integer $big
  22. * @property integer $created_at
  23. * @property integer $updated_at
  24. * @property integer $md_id
  25. * @property integer $supplier_id
  26. */
  27. class PrinterSetting extends \yii\db\ActiveRecord
  28. {
  29. /**
  30. * @inheritdoc
  31. */
  32. public static function tableName()
  33. {
  34. return '{{%printer_setting}}';
  35. }
  36. public function behaviors()
  37. {
  38. return [
  39. [
  40. // 自动更新创建和更新时间
  41. 'class' => TimestampBehavior::class,
  42. 'value' => time()
  43. ]
  44. ];
  45. }
  46. /**
  47. * @inheritdoc
  48. */
  49. public function rules()
  50. {
  51. return [
  52. [['store_id', 'mch_id', 'printer_id', 'block_id', 'is_delete', 'is_attr', 'big', 'created_at', 'updated_at', 'md_id', 'supplier_id'], 'integer'],
  53. [['type'], 'string'],
  54. ['mch_id', 'default', 'value' => 0]
  55. ];
  56. }
  57. /**
  58. * @inheritdoc
  59. */
  60. public function attributeLabels()
  61. {
  62. return [
  63. 'id' => 'ID',
  64. 'store_id' => 'Store ID',
  65. 'mch_id' => '商户主键',
  66. 'printer_id' => '打印机ID',
  67. 'block_id' => '打印模板ID',
  68. 'type' => '打印方式 ',
  69. 'is_delete' => 'Is Delete',
  70. 'is_attr' => '是否打印规格 0--不打印 1--打印',
  71. 'big' => '发大倍数',
  72. 'updated_at' => '更新时间',
  73. 'created_at' => '创建时间',
  74. "md_id" => '门店id',
  75. 'supplier_id' => '供货商id'
  76. ];
  77. }
  78. }