package com.yihu.wlyy.entity.doctor.team.admin;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 医生行政团队。
 *
 * @author Sand
 */
@Entity
@Table(name = "wlyy_admin_team")
public class AdminTeam extends IdEntity {
    private String name;
    private Date createTime;
    private String leaderCode;
    private String orgCode;
    private boolean available;

    public String getName() {
        return name;
    }

    @Column(name = "name")
    public void setName(String name) {
        this.name = name;
    }

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }

    @Column(name = "create_time")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getOrgCode() {
        return orgCode;
    }

    @Column(name = "org_code")
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    public String getLeaderCode() {
        return leaderCode;
    }

    @Column(name = "leader_id")
    public void setLeaderCode(String leaderCode) {
        this.leaderCode = leaderCode;
    }

    public boolean isAvailable() {
        return available;
    }

    @Column(name = "available")
    public void setAvailable(boolean available) {
        this.available = available;
    }
}
