package com.springboot.c4_domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
public class Admin {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column admin.admin_id
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    private Integer adminId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column admin.phone_number
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    private String phoneNumber;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column admin.password
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    private String password;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column admin.nickname
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    private String nickname;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column admin.register_time
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    @JsonFormat(timezone="GMT", pattern="yyyy-MM-dd HH:mm:ss")
    private Date registerTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column admin.last_login_time
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    @JsonFormat(timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;


    public Admin() {
    }

    public Admin(String phoneNumber, String password, String nickname, Date registerTime, Date lastLoginTime) {
        this.phoneNumber = phoneNumber;
        this.password = password;
        this.nickname = nickname;
        this.registerTime = registerTime;
        this.lastLoginTime = lastLoginTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column admin.admin_id
     *
     * @return the value of admin.admin_id
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public Integer getAdminId() {
        return adminId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column admin.admin_id
     *
     * @param adminId the value for admin.admin_id
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column admin.phone_number
     *
     * @return the value of admin.phone_number
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public String getPhoneNumber() {
        return phoneNumber;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column admin.phone_number
     *
     * @param phoneNumber the value for admin.phone_number
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber == null ? null : phoneNumber.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column admin.password
     *
     * @return the value of admin.password
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public String getPassword() {
        return password;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column admin.password
     *
     * @param password the value for admin.password
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column admin.nickname
     *
     * @return the value of admin.nickname
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public String getNickname() {
        return nickname;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column admin.nickname
     *
     * @param nickname the value for admin.nickname
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column admin.register_time
     *
     * @return the value of admin.register_time
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public Date getRegisterTime() {
        return registerTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column admin.register_time
     *
     * @param registerTime the value for admin.register_time
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column admin.last_login_time
     *
     * @return the value of admin.last_login_time
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column admin.last_login_time
     *
     * @param lastLoginTime the value for admin.last_login_time
     *
     * @mbggenerated Fri Mar 08 11:49:11 CST 2024
     */
    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }
}