You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

72 lines
2.2 KiB

  1. <?php
  2. namespace backend\modules\zzcs\models;
  3. use yii\db\ActiveRecord;
  4. /**
  5. * This is the model class for table "bus_expenses".
  6. *
  7. * @property integer $ID
  8. * @property integer $create_user_id
  9. * @property string $create_time
  10. * @property integer $update_user_id
  11. * @property string $update_time
  12. * @property integer $cancel_flag
  13. * @property integer $bus_id
  14. * @property integer $expense_subject_id
  15. * @property integer $expense_type
  16. * @property string $expense_price
  17. * @property string $receive_value
  18. * @property string $expense_destination
  19. * @property string $start_value
  20. * @property string $end_value
  21. */
  22. class BusExpenses extends ActiveRecord
  23. {
  24. /**
  25. * @inheritdoc
  26. */
  27. public static function tableName()
  28. {
  29. return 'bus_expenses';
  30. }
  31. /**
  32. * @inheritdoc
  33. */
  34. public function rules()
  35. {
  36. return [
  37. [['create_user_id', 'create_time', 'update_user_id', 'cancel_flag', 'expense_destination'], 'required'],
  38. [['create_user_id', 'update_user_id', 'cancel_flag', 'bus_id', 'expense_subject_id', 'expense_type'], 'integer'],
  39. [['update_time'], 'safe'],
  40. [['expense_price', 'start_value', 'end_value'], 'number'],
  41. [['create_time', 'receive_value', 'expense_destination'], 'string', 'max' => 255],
  42. ];
  43. }
  44. /**
  45. * @inheritdoc
  46. */
  47. public function attributeLabels()
  48. {
  49. return [
  50. 'ID' => 'ID',
  51. 'create_user_id' => 'Create User ID',
  52. 'create_time' => 'Create Time',
  53. 'update_user_id' => 'Update User ID',
  54. 'update_time' => 'Update Time',
  55. 'cancel_flag' => 'Cancel Flag',
  56. 'bus_id' => '车辆ID',
  57. 'expense_subject_id' => '支出科目(如:加油,充电) 对应dict_type.id 479加油 480 充电',
  58. 'expense_type' => '支出方式 对应dict_type.id',
  59. 'expense_price' => '支付金额',
  60. 'receive_value' => '量(如油量、电量)',
  61. 'expense_destination' => '支出去向',
  62. 'start_value' => '记录车辆节点开始时状态属性值(如:加油前里程数)',
  63. 'end_value' => '记录车辆节点开始时状态属性值',
  64. ];
  65. }
  66. }