FCarScrap.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace app\modules\car\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%f_car_scrap}}".
  6. *
  7. * @property int $id ID
  8. * @property string $card_num 车牌
  9. * @property string|null $city 一级单位,地市
  10. * @property string|null $dpt_sec 二级单位,区县
  11. * @property string|null $grid 三级单位,网格
  12. * @property int $year 年
  13. * @property int $month 月
  14. */
  15. class FCarScrap extends \app\common\models\EActiveRecord
  16. {
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public static function tableName()
  21. {
  22. return '{{%f_car_scrap}}';
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function rules()
  28. {
  29. return [
  30. [['card_num', 'year', 'month'], 'required'],
  31. [['year', 'month'], 'integer'],
  32. [['card_num'], 'string', 'max' => 20],
  33. [['city', 'dpt_sec', 'grid'], 'string', 'max' => 50],
  34. ];
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'card_num' => '车牌',
  44. 'city' => '一级单位,地市',
  45. 'dpt_sec' => '二级单位,区县',
  46. 'grid' => '三级单位,网格',
  47. 'year' => '年',
  48. 'month' => '月',
  49. ];
  50. }
  51. }