package com.cyksj.model.views;

import com.cyksj.model.entity.MiniPopularizeConfig;
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;

/**
 * 项目名: yhlxj2
 * 文件名: MiniPopularizeConfigView
 * 创建者: JavaZou
 * 创建时间:2025/4/7 16:26
 */
@Getter
@Setter
@SearchBean(tables = "mini_popularize_config mpc left join mini_popularize_config_category mc on mc.id = mpc.cid")
public class MiniPopularizeConfigView {
	@DbField("mpc.id")
	private Long id;

	@DbField("mpc.cid")
	private Long cid;

	/**
	 * 分类
	 */
	@DbField("mc.name")
	private String category;

	/**
	 * 类型
	 */
	@DbField("mpc.type")
	private MiniPopularizeConfig.Type type;

	@DbField("mpc.img")
	private String img;

	@DbField("mpc.tips")
	private String tips;

	@DbField("mpc.sorted")
	private Integer sorted;

	@DbField("mpc.status")
	private Boolean status;

	/**
	 * 使用次数
	 */
	@DbField("select count(1) from mini_popularize_config_use_record mmr where mmr.config_id = mpc.id")
	private Integer count;

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

	@DbField("mpc.update_time")
	private Date updateTime;
}
