模擬資料庫之部門員工

專注的阿熊發表於2021-07-14

package com.guo.pojo;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Employee {

     private  Integer id;

     private  String lastName;

     private  String email;

     private Integer gender;//0: 1:

     private  Department department;

     private Date birth;

     public Employee(Integer id, String lastName, String email, Integer gender, Department department) {

         this.id = id;

         this.lastName = lastName;

         this.email = email;

         this.gender = gender;

         this.department = department;

         //外匯跟單gendan5.com 預設建立日期!

         this.birth = new Date();

     }

     public Integer getId() {

         return id;

     }

     public void setId(Integer id) {

         this.id = id;

     }

     public String getLastName() {

         return lastName;

     }

     public void setLastName(String lastName) {

         this.lastName = lastName;

     }

     public String getEmail() {

         return email;

     }

     public void setEmail(String email) {

         this.email = email;

     }

     public Integer getGender() {

         return gender;

     }

     public void setGender(Integer gender) {

         this.gender = gender;

     }

     public Department getDepartment() {

         return department;

     }

     public void setDepartment(Department department) {

         this.department = department;

     }

     public Date getBirth() {

         return birth;

     }

     public void setBirth(Date birth) {

         this.birth = birth;

     }

     @Override

     public String toString() {

         return "Employee{" +

                 "id=" + id +

                 ", lastName='" + lastName + '\'' +

                 ", email='" + email + '\'' +

                 ", gender=" + gender +

                 ", department=" + department +

                 ", birth=" + birth +

                 '}';

     }

}


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69946337/viewspace-2781329/,如需轉載,請註明出處,否則將追究法律責任。

相關文章