package com.ym.mec.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 科目(声部)
 * </p>
 *
 * @author lemeng
 * @since 2019-09-25
 */
public class Subject extends Model<Subject> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id_", type = IdType.AUTO)
    private Integer id;
    @TableField("name_")
    private String name;
    @TableField("code_")
    private String code;
    @TableField("parent_subject_id_")
    private Integer parentSubjectId;
    @TableField("create_time_")
    private Date createTime;
    @TableField("update_time_")
    private Date updateTime;
    @TableField("del_flag_")
    private Integer delFlag;


    public Integer getId() {
        return id;
    }

    public Subject setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public Subject setName(String name) {
        this.name = name;
        return this;
    }

    public String getCode() {
        return code;
    }

    public Subject setCode(String code) {
        this.code = code;
        return this;
    }

    public Integer getParentSubjectId() {
        return parentSubjectId;
    }

    public Subject setParentSubjectId(Integer parentSubjectId) {
        this.parentSubjectId = parentSubjectId;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public Subject setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public Subject setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public Subject setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Subject{" +
                ", id=" + id +
                ", name=" + name +
                ", code=" + code +
                ", parentSubjectId=" + parentSubjectId +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", delFlag=" + delFlag +
                "}";
    }
}
