package com.cyksj.model.views;

import com.cyksj.model.entity.WorkOrder;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/*
 *项目名: netflix
 *文件名: WorkOrderView
 *创建者: JavaZou
 *创建时间:2023/4/19 15:26
 */
@Getter
@Setter
@SearchBean(tables = "work_order wo left join user u on u.id = wo.user_id",
		where = ":feedback:")
public class WorkOrderView {
	@DbField("wo.id")
	private Long id;

	@DbField("wo.user_id")
	private Long userId;

	@DbField("wo.assign_customer_service_id")
	private Long assignCustomerServiceId;

	@DbField("wo.reply_customer_service_id")
	private Long replyCustomerServiceId;

	/**
	 * 回复客服
	 */
	@DbField("select nickname from cms_user cu where cu.id = wo.reply_customer_service_id")
	private String replyCustomer;

	@DbField("wo.close_customer_service_id")
	private Long closeCustomerServiceId;

	/**
	 * 关闭工单客服
	 */
	@DbField("select nickname from cms_user cu where cu.id = wo.close_customer_service_id")
	private String closCustomer;

	@DbField("u.nickname")
	private String nickname;

	@DbField("wo.relation_id")
	private Long relationId;

	@DbField("wo.goods_id")
	private Long goodsId;

	@DbField("wo.imgs")
	private String imgs;

	@DbIgnore
	private String title;

	@DbField("wo.sku_id")
	private Long skuId;

	@DbIgnore
	private String specVal;

	@DbField("wo.topic")
	private String topic;

	@DbField("wo.type")
	private WorkOrder.Type type;

	@DbField("wo.account_id")
	private Long accountId;

	@DbField("wo.account")
	private String account;

	@DbField("wo.customer_service_auth_id")
	private String customerServiceAuthId;

	@DbField("wo.status")
	private WorkOrder.Status status;

	@DbField("wo.created_time")
	private Date createdTime;

	@DbField("wo.content")
	private String content;

	@DbField("wo.remark")
	private String remark;

	@DbIgnore
	private Date finalReplyTime;
}
