2018-11-18 18:49:40 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using HospitalServerManager.InterfacesAndEnums;
|
2018-12-29 11:58:25 +01:00
|
|
|
|
using HospitalServerManager.Model.Controllers;
|
2018-11-18 18:49:40 +01:00
|
|
|
|
|
|
|
|
|
namespace HospitalServerManager.Model.Basic
|
|
|
|
|
{
|
2019-01-07 19:49:48 +01:00
|
|
|
|
internal abstract class SqlTable : ISqlTableModel
|
2018-11-18 18:49:40 +01:00
|
|
|
|
{
|
2018-12-29 11:58:25 +01:00
|
|
|
|
// TODO: Dodac table do klas modelu
|
|
|
|
|
public string PrimaryKey { get; protected set; }
|
2019-01-07 19:49:48 +01:00
|
|
|
|
public string PrimaryKeyName { get; set; }
|
2018-11-18 18:49:40 +01:00
|
|
|
|
protected List<string> ColumnNames { get; set; }
|
|
|
|
|
protected SqlTable()
|
|
|
|
|
{
|
|
|
|
|
PrimaryKey = "BRAK";
|
|
|
|
|
PrimaryKeyName = "BRAK";
|
|
|
|
|
ColumnNames = new List<string>();
|
|
|
|
|
}
|
|
|
|
|
public SqlTable(string primaryKey, string primaryKeyName, List<string> columnNames)
|
|
|
|
|
{
|
|
|
|
|
PrimaryKey = primaryKey;
|
|
|
|
|
PrimaryKeyName = primaryKeyName;
|
|
|
|
|
ColumnNames = columnNames;
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-07 19:49:48 +01:00
|
|
|
|
public List<string> GetColumnNames()
|
|
|
|
|
{
|
|
|
|
|
return ColumnNames;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-11-18 18:49:40 +01:00
|
|
|
|
}
|