<?php
/**
 * Created by FFB.
 * Company: Shenzhen Zhixun Information Tec. Nanchang Com.
 * Copyright: ShenzhenZhixun
 * Email: eastbus@126.com
 * User: FFB
 * Date: 2025-03-11 12:09:31
 * 文件不允许修改，自动生成
 */

namespace common\table\bms_alarm;

class JdzBatteryChargeHistory{
    public static function tableName()
    {
        return '{{jdz_battery_charge_history}}';
    }
                
    /**
     * ------------ 字段 history_id 
     * ------------ 表字段注释: 
     */
    public function filterByHistoryId($val): self
    {
        $this->filterByColumn("history_id", $val);
        return $this;
    }

    public function setHistoryId($val): self
    {
        $this->setAttr("history_id", $val);
        return $this;
    }

    public function getHistoryId()
    {
        return $this->history_id ?? null;
    }
    // ---------------------------------------------
                
    /**
     * ------------ 字段 battery_sn 
     * ------------ 表字段注释: 
     */
    public function filterByBatterySn($val): self
    {
        $this->filterByColumn("battery_sn", $val);
        return $this;
    }

    public function setBatterySn($val): self
    {
        $this->setAttr("battery_sn", $val);
        return $this;
    }

    public function getBatterySn()
    {
        return $this->battery_sn ?? null;
    }
    // ---------------------------------------------
                
    /**
     * ------------ 字段 charge_status 
     * ------------ 表字段注释: 1 充电  2 放电
     */
    public function filterByChargeStatus($val): self
    {
        $this->filterByColumn("charge_status", $val);
        return $this;
    }

    public function setChargeStatus($val): self
    {
        $this->setAttr("charge_status", $val);
        return $this;
    }

    public function getChargeStatus()
    {
        return $this->charge_status ?? null;
    }
    // ---------------------------------------------
                
    /**
     * ------------ 字段 begin_time 
     * ------------ 表字段注释: 首次上报时间
     */
    public function filterByBeginTime($val): self
    {
        $this->filterByColumn("begin_time", $val);
        return $this;
    }

    public function setBeginTime($val): self
    {
        $this->setAttr("begin_time", $val);
        return $this;
    }

    public function getBeginTime()
    {
        return $this->begin_time ?? null;
    }
    // ---------------------------------------------
                
    /**
     * ------------ 字段 end_time 
     * ------------ 表字段注释: 状态变更时间/结束时间
     */
    public function filterByEndTime($val): self
    {
        $this->filterByColumn("end_time", $val);
        return $this;
    }

    public function setEndTime($val): self
    {
        $this->setAttr("end_time", $val);
        return $this;
    }

    public function getEndTime()
    {
        return $this->end_time ?? null;
    }
    // ---------------------------------------------
                
    /**
     * ------------ 字段 max_current 
     * ------------ 表字段注释: 最大电量
     */
    public function filterByMaxCurrent($val): self
    {
        $this->filterByColumn("max_current", $val);
        return $this;
    }

    public function setMaxCurrent($val): self
    {
        $this->setAttr("max_current", $val);
        return $this;
    }

    public function getMaxCurrent()
    {
        return $this->max_current ?? null;
    }
    // ---------------------------------------------
                
    /**
     * ------------ 字段 avg_current 
     * ------------ 表字段注释: 平均电量
     */
    public function filterByAvgCurrent($val): self
    {
        $this->filterByColumn("avg_current", $val);
        return $this;
    }

    public function setAvgCurrent($val): self
    {
        $this->setAttr("avg_current", $val);
        return $this;
    }

    public function getAvgCurrent()
    {
        return $this->avg_current ?? null;
    }
    // ---------------------------------------------
    
}
