package com.jqyd.camera.library;
/**
* 附件对象父类
* @author tianbingbing
*
*/
public class AccessoryDTO<T extends AbstractDTO> extends AbstractDTO{
/**
*
*/
private static final long serialVersionUID = 1L;
private String name;
private String path;
private byte[] content;
private String type;
private T bill;
private String contentstr;//文字说明
public String getContentstr() {
return contentstr;
}
public void setContentstr(String contentstr) {
this.contentstr = contentstr;
}
/**
* 附件类型
* @return
*/
public String getType() {
return type;
}
/**
* 附件类型
* @param type
*/
public void setType(String type) {
this.type = type;
}
/**
* 附件名称
* @return
*/
public String getName() {
return name;
}
/**
* 附件名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 附件路径
* @return
*/
public String getPath() {
return path;
}
/**
* 附件路径
* @param path
*/
public void setPath(String path) {
this.path = path;
}
/**
* 附近内容
* @return
*/
public byte[] getContent() {
return content;
}
/**
* 附件内容
* @param content
*/
public void setContent(byte[] content) {
this.content = content;
}
/**
* 设置表单对象
* @return
*/
public T getBill() {
return bill;
}
/**
* 设置表单对象
* @param bill
*/
public void setBill(T bill) {
this.bill = bill;
}
public static enum AccessoryType {
voice("01","语音"),
image("02","图片"),
file("03","文件"),
;
private String code;
private String name;
public String getCode() {
return code;
}
public String getName() {
return name;
}
private AccessoryType(String code,String name){
this.code = code;
this.name = name;
}
public static AccessoryType getCTByCode(String code){
for(AccessoryType t : AccessoryType.values()){
if(t.code.equals(code))return t;
}
return null;
}
}
}