81,091
社区成员
发帖
与我相关
我的任务
分享
package com.wego.domain;
public enum CustomerStage {
CustomerFocus("意向关注",1,"次",true),
CustomerCommunication("意向沟通",5,"次",true),
ClearIntention("意向明确重点跟踪",10,"次",true),
PreOrders("预定评估",20,"次",true),
ProductOrder("客户订单",25,"次",true),
Order("订单",990,"顶",false),
GiveUpDOcumentary("放弃跟单",999,"",true),
;
//中文名称
private String type;
//排序,阶段排序
private int index;
//单位
private String unit;
//标识
private boolean viewFlag;
private CustomerStage(String type,int index,String unit,boolean viewFlag){
this.type=type;
this.index=index;
this.unit=unit;
this.viewFlag=viewFlag;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public boolean isViewFlag() {
return viewFlag;
}
public void setViewFlag(boolean viewFlag) {
this.viewFlag = viewFlag;
}
}
<hibernate-mapping package="com.wego.domain">
<class name="CustomerInfo" table="t_customer_customerinfo">
<id name="customerid" column="customerId">
<generator class="native"></generator>
</id>
<property name="customerStage" column="customerStage" length="20">
<type name="org.hibernate.type.EnumType">
<param name="enumClass">com.wego.domain.CustomerStage</param>
<param name="type">12</param>
</type>
</property>
CREATE TABLE `t_customer_customerinfo` (
`customerId` int(11) NOT NULL AUTO_INCREMENT,
`customerStage` int(11) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
PRIMARY KEY (`customerId`),
KEY `FKkn75tso3sqx0qayd4g61fymak` (`orgId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;