YiLianYun.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace common\models\extend\printer;
  3. /**
  4. * Class YiLianYun
  5. * @package common\models\hardware
  6. * @author jianyan74 <751393839@qq.com>
  7. */
  8. class YiLianYun extends \yii\base\Model
  9. {
  10. public $terminal_number;
  11. public $secret_key;
  12. public $app_id;
  13. public $app_secret_key;
  14. public $print_num = 1;
  15. public function rules()
  16. {
  17. return [
  18. [['terminal_number', 'secret_key', 'app_id', 'app_secret_key', 'print_num'], 'required'],
  19. [['terminal_number', 'secret_key', 'app_id'], 'integer'],
  20. [['print_num'], 'integer', 'min' => 1, 'max' => 9],
  21. ];
  22. }
  23. public function attributeLabels()
  24. {
  25. return [
  26. 'terminal_number' => '终端号',
  27. 'secret_key' => ' 密钥',
  28. 'app_id' => '应用ID',
  29. 'app_secret_key' => '应用密钥',
  30. 'print_num' => '打印联数'
  31. ];
  32. }
  33. /**
  34. * @return array|string[]
  35. */
  36. public function attributeHints()
  37. {
  38. return [
  39. 'app_id' => ' 易联云开放平台创建应用获取',
  40. 'app_secret_key' => '易联云开放平台创建应用获取',
  41. 'print_num' => '同一个记录,打印的数量,区间范围为 1-9'
  42. ];
  43. }
  44. }
粤ICP备19079148号