import { DataType, TableType } from "@/enum";

export interface DataTypeOption {
  label: string;
  value: DataType
}

/**
 * 数据类型
 */
export const DATA_TYPE_OPTIONS: DataTypeOption[] = [
  {label: DataType[DataType.Int], value: DataType.Int},
  {label: DataType[DataType.Decimal], value: DataType.Decimal},
  {label: DataType[DataType.Real], value: DataType.Real},
  {label: DataType[DataType.Nvarchar], value: DataType.Nvarchar},
  {label: DataType[DataType.DateTime], value: DataType.DateTime},
  {label: DataType[DataType.Bit], value: DataType.Bit},
];

/**
 * 表类型
 */
export const TABLE_TYPE_OPTIONS = [
  // {label: "系统表", value: 1},
  {label: "流程表", value: TableType.FlowTable},
  {label: "业务表", value: TableType.BusinessTable},
  // {label: "视图", value: 4},
];

/**
 * 对应关系
 */
export const RELATION_TYPE_OPTIONS = [
  {label: "一对一", value: 1},
  {label: "一对多", value: 2},
  {label: "多对一", value: 3},
];

/**
 * 默认系统变量
 */
export const DEFAULT_SYSTEM_VARIABLES = [
  {id: '1', name: "LanguageCulture", type: "String"},
  {id: '2', name: "UserId", type: "String"},
  {id: '3', name: "UserCode", type: "String"},
  {id: '4', name: "SystemDate", type: "Date"},
  {id: '5', name: "?", type: "运行中的参数"},
];

/**
 * 默认设置
 */
export const DEFAULT_SETTING = {
  showMenu: true,
  showSidebar: true,
  showColumnDetail: true,
  showGrid: true,
  showRelation: true,
  autoUpdate: false,
  tableWidth: 300,
};