/*
 *    Copyright (c) 2018-2025, hnqz All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: hnqz
 */

package com.qunzhixinxi.hnqz.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 档案-配送公司
 *
 * @author gaoyanng
 * @date 2020-06-25 23:35:42
 */
@Data
@TableName("wm_da_distribution")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "档案-配送公司")
public class WmDaDistribution extends Model<WmDaDistribution> {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@TableId
	@ApiModelProperty(value = "")
	private String id;
	/**
	 * 商业公司名称
	 */
	@ApiModelProperty(value = "商业公司名称")
	private String gsmc;
	/**
	 * 省
	 */
	@ApiModelProperty(value = "省")
	private String province;
	/**
	 * 市
	 */
	@ApiModelProperty(value = "市")
	private String city;
	/**
	 * 区
	 */
	@ApiModelProperty(value = "区")
	private String area;
	/**
	 * 地址
	 */
	@ApiModelProperty(value = "地址")
	private String address;
	/**
	 * 经度
	 */
	@ApiModelProperty(value = "经度")
	private String longitude;
	/**
	 * 纬度
	 */
	@ApiModelProperty(value = "纬度")
	private String latitude;
	/**
	 * 公司规模
	 */
	@ApiModelProperty(value = "公司规模")
	private String gsgm;
	/**
	 * 三合一社会信用代码
	 */
	@ApiModelProperty(value = "三合一社会信用代码")
	private String shyshxydm;
	/**
	 * 公司注册地
	 */
	@ApiModelProperty(value = "公司注册地")
	private String gszcd;
	/**
	 * 注册资本
	 */
	@ApiModelProperty(value = "注册资本")
	private String zczb;
	/**
	 * GSP证书编号
	 */
	@ApiModelProperty(value = "GSP证书编号")
	private String gspzsbh;
	/**
	 * 法人代表
	 */
	@ApiModelProperty(value = "法人代表")
	private String frdb;
	/**
	 * 总经理
	 */
	@ApiModelProperty(value = "总经理")
	private String zjl;
	/**
	 * 采购部门负责人姓名
	 */
	@ApiModelProperty(value = "采购部门负责人姓名")
	private String cjbmfzrxm;
	/**
	 * 采购部门负责人联系方式
	 */
	@ApiModelProperty(value = "采购部门负责人联系方式")
	private String cjbmfzrlxfs;
	/**
	 * 采购部门对接人姓名
	 */
	@ApiModelProperty(value = "采购部门对接人姓名")
	private String cgbmdjrxm;
	/**
	 * 采购部门对接人联系方式
	 */
	@ApiModelProperty(value = "采购部门对接人联系方式")
	private String cgbmdjrlxfs;
	/**
	 * 销售部门负责人姓名
	 */
	@ApiModelProperty(value = "销售部门负责人姓名")
	private String xsbmfzrxm;
	/**
	 * 销售部门负责人联系方式
	 */
	@ApiModelProperty(value = "销售部门负责人联系方式")
	private String xsbmfzrlxfs;
	/**
	 * 销售部门对接人姓名
	 */
	@ApiModelProperty(value = "销售部门对接人姓名")
	private String xsbmdjrxm;
	/**
	 * 销售部门对接人联系方式
	 */
	@ApiModelProperty(value = "销售部门对接人联系方式")
	private String xsbmdjrlxfs;
	/**
	 * 公司简介
	 */
	@ApiModelProperty(value = "公司简介")
	private String gsjj;
	/**
	 * 经营优势
	 */
	@ApiModelProperty(value = "经营优势")
	private String jyys;
	/**
	 * 组织机构ID
	 */
	@ApiModelProperty(value = "组织机构ID")
	private Integer deptId;
	/**
	 * 是否删除
	 */
	@ApiModelProperty(value = "是否删除")
	private Integer delFlag;
	/**
	 * 是否禁用
	 */
	@ApiModelProperty(value = "是否禁用")
	private Integer enableFlag;
	/**
	 * 所属租户
	 */
	@ApiModelProperty(value = "所属租户", hidden = true)
	private Integer tenantId;
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;
	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人")
	private Integer createUser;
	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	private LocalDateTime updateTime;
	/**
	 * 更新人
	 */
	@ApiModelProperty(value = "更新人")
	private Integer updateUser;

	/**
	 * 商业公司地址
	 */
	@ApiModelProperty(value = "商业公司地址")
	private String sygsdz;

	/**
	 * 药品信息化追溯体系（0-扫码入库，1-其他）
	 */
	@ApiModelProperty(value = "药品信息化追溯体系（0-扫码入库，1-其他）")
	private String medicineTraceability;

	/**
	 * 药品信息化追溯体系名称
	 */
	@TableField(exist = false)
	@ApiModelProperty(value = "药品信息化追溯体系名称")
	private String medicineTraceabilityName;

	/**
	 * 药品信息化追溯体系-其他
	 */
	@ApiModelProperty(value = "药品信息化追溯体系-其他")
	private String medicineTraceabilityOther;

	/**
	 * 药品信息化追溯体系枚举类
	 */
	public enum MedicineTraceabilityEnum {
		// 0-扫码入库，1-其他
		SCAN_CODE("0", "扫码入库"),
		OTHER("1", "其他"),
		DEFAULT_NULL("", "");

		private String val;

		private String name;

		MedicineTraceabilityEnum(String val, String name) {
			this.val = val;
			this.name = name;
		}

		public String getVal() {
			return val;
		}

		public String getName() {
			return name;
		}

	}

	/**
	 * 药品信息化追溯体系枚举类转换
	 *
	 * @param val
	 * @return
	 */
	public static MedicineTraceabilityEnum resolve(String val){
		for (MedicineTraceabilityEnum medicineTraceabilityEnum: MedicineTraceabilityEnum.values()){
			if (medicineTraceabilityEnum.val.equals(val)){
				return medicineTraceabilityEnum;
			}
		}
		return MedicineTraceabilityEnum.DEFAULT_NULL;
	}
}
