Color.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. /**
  10. * This is the model class for table "{{%color}}".
  11. *
  12. * @property integer $id
  13. * @property string $rgb
  14. * @property string $color
  15. * @property integer $is_delete
  16. * @property integer $created_at
  17. */
  18. class Color extends \yii\db\ActiveRecord
  19. {
  20. /**
  21. * @inheritdoc
  22. */
  23. public static function tableName()
  24. {
  25. return '{{%color}}';
  26. }
  27. /**
  28. * @inheritdoc
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['rgb', 'color'], 'required'],
  34. [['is_delete', 'created_at'], 'integer'],
  35. [['rgb', 'color'], 'string', 'max' => 255],
  36. ];
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => 'ID',
  45. 'rgb' => 'rgb颜色码 例如:\"0,0,0\"',
  46. 'color' => '16进制颜色码例如:#ffffff',
  47. 'is_delete' => 'Is Delete',
  48. 'created_at' => 'Addtime',
  49. ];
  50. }
  51. }