package com.ruoyi.bst.driver.service.impl;

import org.springframework.stereotype.Service;

import com.ruoyi.bst.driver.domain.Driver;
import com.ruoyi.bst.driver.domain.enums.DriverStatus;
import com.ruoyi.bst.driver.service.DriverConverter;

@Service
public class DriverConverterImpl implements DriverConverter {
    
    @Override
    public Driver toPoByAppCreate(Driver data) {
        if (data == null) {
            return null;
        }
        Driver driver = new Driver();
        driver.setUserId(data.getUserId());
        driver.setNo(data.getNo());
        driver.setName(data.getName());
        driver.setPictureFront(data.getPictureFront());
        driver.setPictureBack(data.getPictureBack());
        driver.setStatus(DriverStatus.WAIT_VERIFY.getCode());
        return driver;
    }

}
