package com.ssm.manage.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;
import java.io.Serializable;
import java.util.Objects;

/**
 * 管理门店关系表(StoreManagement)实体类
 *
 * @author makejava
 * @since 2022-01-24 09:33:59
 */
@Table(name = "store_management")
public class StoreManagement implements Serializable {
    private static final long serialVersionUID = -56903856756465116L;
    /**
     * id
     */
    @Column(name = "id")
    private Long id;
    /**
     * 管理门店ID
     */
    @Column(name = "store_ids")
    private Long storeIds;
    /**
     * 受管理门店ID
     */
    @Column(name = "store_id")
    private Long storeId;
    /**
     * 创建者ID
     */
    @Column(name = "funder_id")
    private Long funderId;
    /**
     * 创建者名称
     */
    @Column(name = "funder_name")
    private String funderName;
    /**
     * 创建时间
     */
    @Column(name = "funder_date")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date funderDate;
    /**
     * 修改者ID
     */
    @Column(name = "updated_id")
    private Long updatedId;
    /**
     * 修改者名称
     */
    @Column(name = "updated_name")
    private String updatedName;
    /**
     * 修改时间
     */
    @Column(name = "updated_name")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedDate;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStoreIds() {
        return storeIds;
    }

    public void setStoreIds(Long storeIds) {
        this.storeIds = storeIds;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Long getFunderId() {
        return funderId;
    }

    public void setFunderId(Long funderId) {
        this.funderId = funderId;
    }

    public String getFunderName() {
        return funderName;
    }

    public void setFunderName(String funderName) {
        this.funderName = funderName;
    }

    public Date getFunderDate() {
        return funderDate;
    }

    public void setFunderDate(Date funderDate) {
        this.funderDate = funderDate;
    }

    public Long getUpdatedId() {
        return updatedId;
    }

    public void setUpdatedId(Long updatedId) {
        this.updatedId = updatedId;
    }

    public String getUpdatedName() {
        return updatedName;
    }

    public void setUpdatedName(String updatedName) {
        this.updatedName = updatedName;
    }

    public Date getUpdatedDate() {
        return updatedDate;
    }

    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StoreManagement that = (StoreManagement) o;
        return Objects.equals(id, that.id) && Objects.equals(storeIds, that.storeIds) && Objects.equals(storeId, that.storeId) && Objects.equals(funderId, that.funderId) && Objects.equals(funderName, that.funderName) && Objects.equals(funderDate, that.funderDate) && Objects.equals(updatedId, that.updatedId) && Objects.equals(updatedName, that.updatedName) && Objects.equals(updatedDate, that.updatedDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, storeIds, storeId, funderId, funderName, funderDate, updatedId, updatedName, updatedDate);
    }

    @Override
    public String toString() {
        return "StoreManagement{" +
                "id=" + id +
                ", storeIds=" + storeIds +
                ", storeId=" + storeId +
                ", funderId=" + funderId +
                ", funderName='" + funderName + '\'' +
                ", funderDate=" + funderDate +
                ", updatedId=" + updatedId +
                ", updatedName='" + updatedName + '\'' +
                ", updatedDate=" + updatedDate +
                '}';
    }
}

