package model;

import javafx.scene.image.Image;

import java.awt.image.BufferedImage;
import java.time.LocalDate;

/**
 * Created by Gondr on 1/06/2017.
 */
public class Driver extends User{

    protected LicenseType licenseType;
    protected String licenseNumber;
    protected LocalDate licenseDateIssued;
    protected LocalDate licenseDateExpire;

    public enum LicenseType{
        RESTRICTED("Restricted"), FULL("Full"), FULL2YEARS("Full for 2 Years");
        public String name;

        LicenseType(String name){
            this.name = name;
        }
        public static LicenseType getValueOf(String s){
            switch (s){
                case "Restricted":
                    return RESTRICTED;
                case "Full":
                    return FULL;
                case "Full for 2 Years":
                    return FULL2YEARS;
                default:
                    return null;
            }
        }
    }

    public Driver(int studentNumber, String email, String password, String address, String homephone, String mobilephone,
                  Image photo, LicenseType licenseType, String licenseNumber, LocalDate licenseDateIssued, LocalDate licenseDateExpire){
        super(studentNumber, email, password, address, homephone, mobilephone, photo);
        this.accountType = AccountType.DRIVER;
        this.licenseType = licenseType;
        this.licenseNumber = licenseNumber;
        this.licenseDateIssued = licenseDateIssued;
        this.licenseDateExpire = licenseDateExpire;
    }

}
