package com.lightinit.hsdataplatform.entity;

import com.lightinit.hsdataplatform.annotation.FieldDescriber;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Partner {
    private Long id;
    @NotEmpty()
    @FieldDescriber(descripton = "合作伙伴")
    private String partnerName;
    @NotEmpty()
    @FieldDescriber(descripton = "联系人")
    private String contact;
    @NotEmpty()
    @FieldDescriber(descripton = "手机号")
    private String phone;
    @Email
    @NotEmpty()
    @FieldDescriber(descripton = "邮箱")
    private String email;
    @NotEmpty()
    @FieldDescriber(descripton = "地址")
    private String address;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createdAt;

    private Long createdBy;

    private Date deletedAt;

    private Long deletedBy;

    private String description;

    public Long getId() {
        return id;
    }

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

    public String getPartnerName() {
        return partnerName;
    }

    public void setPartnerName(String partnerName) {
        this.partnerName = partnerName == null ? null : partnerName.trim();
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact == null ? null : contact.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Long getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }

    public Date getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(Date deletedAt) {
        this.deletedAt = deletedAt;
    }

    public Long getDeletedBy() {
        return deletedBy;
    }

    public void setDeletedBy(Long deletedBy) {
        this.deletedBy = deletedBy;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }
}