package com.example.beijing_daxing.been;

import androidx.databinding.BaseObservable;

import java.util.List;

/**
 * 人员信息对象 pm_base_person_info
 *
 * @author ruoyi
 * @date 2025-11-26
 */
public class PmBasePersonInfo extends BaseObservable {

    /**
     * 人员表主键
     */
    private Long basePersonId;

    /**
     * RFID编码
     */

    private String rfidId;

    /**
     * 工号
     */

    private String employeeId;

    /**
     * 姓名
     */

    private String peopleName;

    /**
     * 性别
     */

    private String peopleSex;

    /**
     * 驾驶证代号
     */
    private String driverCode;

    /**
     * 联系电话
     */
    private String phoneNumber;

    /**
     * 照片
     */
    private String photoPath;

    /**
     * 有效日期截止
     */
    private String joinDate;

    /**
     * 学历
     */
    private String academicQualification;

    private List<PmRecordPenalty> pmRecordPenalties;
    private int penaltyCount;

    public int getPenaltyCount() {
        penaltyCount = pmRecordPenalties==null || pmRecordPenalties.isEmpty() ? 0 : pmRecordPenalties.size();
        return penaltyCount;
    }

    // public void setPenaltyCount(int penaltyCount) {
    //     this.penaltyCount = penaltyCount;
    // }

    public Long getBasePersonId() {
        return basePersonId;
    }

    public void setBasePersonId(Long basePersonId) {
        this.basePersonId = basePersonId;
    }

    public String getRfidId() {
        return rfidId;
    }

    public void setRfidId(String rfidId) {
        this.rfidId = rfidId;
    }

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public String getPeopleName() {
        return peopleName;
    }

    public void setPeopleName(String peopleName) {
        this.peopleName = peopleName;
    }

    public String getPeopleSex() {
        return peopleSex;
    }

    public void setPeopleSex(String peopleSex) {
        this.peopleSex = peopleSex;
    }

    public String getDriverCode() {
        return driverCode;
    }

    public void setDriverCode(String driverCode) {
        this.driverCode = driverCode;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPhotoPath() {
        return photoPath;
    }

    public void setPhotoPath(String photoPath) {
        this.photoPath = photoPath;
    }

    public String getJoinDate() {
        return joinDate;
    }

    public void setJoinDate(String joinDate) {
        this.joinDate = joinDate;
    }

    public String getAcademicQualification() {
        return academicQualification;
    }

    public void setAcademicQualification(String academicQualification) {
        this.academicQualification = academicQualification;
    }
    public List<PmRecordPenalty> getPmRecordPenalties() {
        return pmRecordPenalties;
    }

    public void setPmRecordPenalties(List<PmRecordPenalty> pmRecordPenalties) {
        this.pmRecordPenalties = pmRecordPenalties;
        notifyChange();
    }

    public void clearUi() {
        setEmployeeId(null);
        setPeopleName(null);
        setDriverCode(null);
        setJoinDate(null);
        setPhotoPath(null);
        notifyChange();
    }
}
