FMileageAttend.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\modules\car\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%f_mileage_attend}}".
  6. *
  7. * @property int $id 序号
  8. * @property int $car_id 外键关联f_car_infor(car_id)
  9. * @property float|null $mileage 行驶里程
  10. * @property int|null $attend_days 出勤天数
  11. * @property float|null $av_daily_mileage 日均行驶里程
  12. * @property float|null $attend_rate 出勤率
  13. * @property int|null $year 年
  14. * @property int|null $month 月
  15. */
  16. class FMileageAttend extends \app\common\models\EActiveRecord
  17. {
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public static function tableName()
  22. {
  23. return '{{%f_mileage_attend}}';
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['car_id'], 'required'],
  32. [['car_id', 'attend_days', 'year', 'month'], 'integer'],
  33. [['mileage', 'av_daily_mileage', 'attend_rate'], 'number'],
  34. ];
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => '序号',
  43. 'car_id' => '外键关联f_car_infor(car_id)',
  44. 'mileage' => '行驶里程',
  45. 'attend_days' => '出勤天数',
  46. 'av_daily_mileage' => '日均行驶里程',
  47. 'attend_rate' => '出勤率',
  48. 'year' => '年',
  49. 'month' => '月',
  50. ];
  51. }
  52. }