using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace APT.BaseData.Domain.ApiModel
{
	public class ExecuteSqlResult
	{
		public ExecuteSqlResult()
		{
			this.Tables = new List<ExecuteSqlTable>();
		}
		public List<ExecuteSqlTable> Tables { get; set; }
		 
	}

	public class ExecuteSqlTable
	{
		public ExecuteSqlTable()
		{
			this.ID = Guid.NewGuid();
			this.Rows = new List<ExecuteSqlRow>();
			this.Columns = new List<ExecuteSqlColumn>();
		}
		public Guid ID { get; set; }

		public string Label { get; set; }

		public int Index { get; set; }

		public bool IsSelectTable { get; set; }

		public List<ExecuteSqlColumn> Columns { get; set; }

		public List<ExecuteSqlRow> Rows { get; set; }
	}
	public class ExecuteSqlColumn
	{
		public ExecuteSqlColumn()
		{
			this.ID = Guid.NewGuid();
		}
		public Guid ID { get; set; }

		public string FieldName { get; set; }
		public string Label { get; set; }

		public Type ColumnType { get; set; }
	}
	public class ExecuteSqlRowColumn
	{
		public ExecuteSqlRowColumn()
		{
			this.ID = Guid.NewGuid();
		}
		public Guid ID { get; set; }

		public Guid ColumnId { get; set; }

		public string Value { get; set; }
	}
	public class ExecuteSqlRow
	{
		public ExecuteSqlRow()
		{
			this.ID = Guid.NewGuid();
			this.Datas = new List<ExecuteSqlRowColumn>();
		}
		public Guid ID { get; set; }
		public List<ExecuteSqlRowColumn> Datas { get; set; }
	}
}
