import { BaseEntity } from '@cool-midway/core';
import { Column, Index, Entity } from 'typeorm';

/**
 * 图层
 */
@Entity('map_layers')
export class BaseSysLayersEntity extends BaseEntity {
  @Column({ comment: '父Id', nullable: true })
  parentId: number;

  @Index()
  @Column({ comment: '图层描述', length: 50 })
  layerName: string;

  @Column({ comment: '图层类型', length: 50, nullable: true })
  layerType: string;

  @Column({ comment: '图层顺序', nullable: true })
  layerOrder: number;

  @Column({ comment: '排序' })
  orderNum: number;

  @Column({ comment: '图层类型编码', length: 50, nullable: true })
  layerCode: string;

  @Column({ comment: '数据源', length: 1000 })
  dataSource: string;

  @Column({ comment: '过滤条件', nullable: true, length: 100 })
  filterConditions: string;

  @Column({ comment: '参数集', nullable: true, type: 'json' })
  parameterSet: string;

  @Column({ comment: '加载接口类型', nullable: true, length: 50 })
  loadType: string;

  @Column({ comment: '样式图片', nullable: true, length: 100 })
  imageUrl: string;

  // @Column({ comment: '是否支持地图查询', nullable: true, length: 1 })
  mapQuery: string;

  querySetLi: string;

  @Column({ comment: '查询源', nullable: true, type: 'json' })
  querySet: string;

  // @Column({ comment: '展示字段', nullable: true, length: 50 })
  displayField: string;

  // @Column({ comment: '查询字段', nullable: true, length: 50 })
  queryField: string;
  queryFilter: string;

  @Column({ comment: '查询提示信息', nullable: true, length: 50 })
  promptInfo: string;

  isCheck: number;
}
