package cn.estsh.i3plus.pojo.wms.bean;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.annotation.DynamicField;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description : 物流费用管理(长途运输)
 * @Reference :
 * @Author : qianhuasheng
 * @CreateDate : 2020-05-06 14:50
 * @Modify:
 **/
@Data
@Entity
@Table(name = "WMS_LOGISTICS_COSTS")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "物流费用管理")
public class WmsLogisticsCosts extends BaseBean {

    private static final long serialVersionUID = -5307311210847854654L;
    @Column(name = "ORGANIZE_NAME")
    @ApiParam(value = "工厂名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String organizeName;

    @Column(name = "PLACE_OF_ORIGIN")
    @ApiParam(value = "发出地")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String placeOfOrigin;

    @Column(name = "DESTINATION_WAREHOUSE")
    @ApiParam(value = "目的仓库")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String destinationWarehouse;

    @Column(name = "SHIPPING_FLAG")
    @ApiParam(value = "发往地")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String shippingFlag;

    @Column(name = "LOGISTICS_VENDOR_NO")
    @ApiParam(value = "物流供应商")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String logisticsVendorNo;

    @Column(name = "SALES_UNIT")
    @ApiParam(value = "计价单位")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String salesUnit;

    @Column(name = "TRANSPORT_TYPE")
    @ApiParam(value = "运输方式")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, dataSrc = "NORMAL_ABNORMAL")
    @AnnoOutputColumn(refClass = WmsEnumUtil.NORMAL_ABNORMAL.class)
    private Integer transportType;

    @Column(name = "price")
    @ApiParam(value = "单价")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private Double price;

    @Column(name = "START_DATE")
    @ApiParam(value = "生效日期")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String startDate;

    @Column(name = "END_DATE")
    @ApiParam(value = "结束日期")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String endDate;

}
