using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AVS { public class DailyLog { public string FNSKU { get; set; } public DateTime RECORD_DATE { get; set; } public string SYS_IP { get; set; } public string USER_ID { get; set; } public decimal LIVE_WEIGHT { get; set; } public string WRONG_FNSKU { get; set; } public bool IS_WEIGHT_WRONG { get; set; } public bool IS_FNSKU_WRONG { get; set; } public string MODEL_NO { get; set; } public decimal NET_WEIGHT { get; set; } public string WRONG_CARTON { get; set; } public string MARKET_PLACE { get; set; } public string PC_NAME { get; set; } public class TableColumn { public string Name { get; set; } public string DataType { get; set; } } public class DailyLogTable { public static List GetColumns() { return new List { new TableColumn { Name = "Id", DataType = "INTEGER PRIMARY KEY AUTOINCREMENT" }, new TableColumn { Name = "FNSKU", DataType = "TEXT" }, new TableColumn { Name = "RECORD_DATE", DataType = "DATETIME" }, new TableColumn { Name = "SYS_IP", DataType = "TEXT" }, new TableColumn { Name = "USER_ID", DataType = "TEXT" }, new TableColumn { Name = "LIVE_WEIGHT", DataType = "REAL" }, new TableColumn { Name = "WRONG_FNSKU", DataType = "TEXT" }, new TableColumn { Name = "IS_WEIGHT_WRONG", DataType = "BOOLEAN" }, new TableColumn { Name = "IS_FNSKU_WRONG", DataType = "BOOLEAN" }, new TableColumn { Name = "MODEL_NO", DataType = "TEXT" }, new TableColumn { Name = "NET_WEIGHT", DataType = "REAL" }, new TableColumn { Name = "WRONG_CARTON", DataType = "TEXT" }, new TableColumn { Name = "MARKET_PLACE", DataType = "TEXT" }, new TableColumn { Name = "PC_NAME", DataType = "TEXT" } }; } } public static string GetColumnsDefinition(List columns) { // Convert the list of columns into a string for the CREATE TABLE command return string.Join(", ", columns.Select(c => $"{c.Name} {c.DataType}")); } } }