package models

import (
	"github.com/beego/beego/v2/client/orm"
	//"time"
)

type CygxReportMappingCygx struct {
	Id                  int    `orm:"column(id);pk" description:"id"`
	ChartPermissionId   int    `description:"行业ID"`
	ChartPermissionName string `description:"行业名称"`
	MatchTypeName       string `description:"分类名称"`
	ReportType          int    `description:"报告类型,2产业报告,1行业报告"`
	Sort                int    `description:"排序"`
	IsCustom            int    `description:"是否属于自定义的匹配类型 ,1是,0否"`
	IsSummary           int    `description:"是否是纪要库,1是,0否"`
	IsReport            int    `description:"是否是报告,1是,0否"`
	PermissionType      int    `description:"1主观,2客观"`
}

// 列表
func GetCygxReportMappingCygxByCon(condition string, pars []interface{}) (items []*CygxReportMappingCygx, err error) {
	o := orm.NewOrm()
	sql := `SELECT * FROM cygx_report_mapping_cygx as art WHERE 1= 1 `
	if condition != "" {
		sql += condition
	}
	_, err = o.Raw(sql, pars).QueryRows(&items)
	return
}