package com.ozs.base.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 供应商管理
 *
 * @author sunhh
 */
@Data
@TableName("base_supplier")
public class BaseSupplier {

    @ApiModelProperty(value = "主键id")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @NotBlank(message = "供应商名称不能为空")
    @ApiModelProperty(value = "供应商名称")
    @TableField("supplier_name")
    private String supplierName;

    @ApiModelProperty(value = "供应商负责人")
    @TableField("supplier_responsible_person")
    private String supplierResponsiblePerson;

    @ApiModelProperty(value = "供应商地址")
    @TableField("supplier_address")
    private String supplierAddress;

    @ApiModelProperty(value = "供应商类型")
    @TableField("supplier_type")
    private String supplierType;

    @ApiModelProperty(value = "状态 黑名单0，白名单1")
    @TableField("supplier_state")
    private String supplierState;

    @ApiModelProperty(value = "预先采购 关0，开1")
    @TableField("supplier_advance_purchase")
    private String supplierAdvancePurchase;

    @ApiModelProperty(value = "邮政编码")
    @TableField("postal_code")
    private String postalCode;

    @ApiModelProperty(value = "项目联系人")
    @TableField("project_person")
    private String projectPerson;

    @ApiModelProperty(value = "联系电话")
    @TableField("telephone")
    private String telephone;

    @ApiModelProperty(value = "银行账户名称")
    @TableField("bank_account_name")
    private String bankAccountName;

    @ApiModelProperty(value = "开户银行")
    @TableField("bank_of_deposit")
    private String bankOfDeposit;

    @ApiModelProperty(value = "银行账号")
    @TableField("bank_account_number")
    private String bankAccountNumber;

    @ApiModelProperty(value = "创建者")
    @TableField("created")
    private String created;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "修改者")
    @TableField("updated")
    private String updated;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private Date updateTime;
}
