package com.tarena.oss.admin.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import com.tarena.oss.rights.pojo.Role;

public class Admin implements Serializable{
	private Integer id;
	private String name;
	private String loginname;
	private String loginpassword;
	private String phone;
	private String email;
	private Date enrolldate;
	private Set<Role> roles=new HashSet<Role>();
	
	public Set<Role> getRoles() {
		return roles;
	}
	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}
	
	public Admin(String loginname, String loginpassword) {
		super();
		this.loginname = loginname;
		this.loginpassword = loginpassword;
	}
	
	public Admin(Integer id, String name, String loginname, String loginpassword, String phone, String email, Date enrolldate) {
		super();
		this.id = id;
		this.name = name;
		this.loginname = loginname;
		this.loginpassword = loginpassword;
		this.phone = phone;
		this.email = email;
		this.enrolldate = enrolldate;
	}
	public Admin(Integer id, String name, String loginname, String loginpassword, String phone, String email) {
		super();
		this.id = id;
		this.name = name;
		this.loginname = loginname;
		this.loginpassword = loginpassword;
		this.phone = phone;
		this.email = email;
	}
	public Admin() {
		super();
	}
	
	public Admin(String name, String loginname, String loginpassword, String phone, String email, Date enrolldate) {
		super();
		this.name = name;
		this.loginname = loginname;
		this.loginpassword = loginpassword;
		this.phone = phone;
		this.email = email;
		this.enrolldate = enrolldate;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Date getEnrolldate() {
		return enrolldate;
	}
	public void setEnrolldate(Date date) {
		this.enrolldate = date;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getLoginname() {
		return loginname;
	}
	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}
	public String getLoginpassword() {
		return loginpassword;
	}
	public void setLoginpassword(String loginpassword) {
		this.loginpassword = loginpassword;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Override
	public String toString() {
		return "name:"+name+" "+"loginname:"+loginname+" "+"loginpassword:"
		+loginpassword+" "+"phone:"+phone+" "+"email:" +email;
	}
	
}
