Example #1
0
        public static string GetCreateTableQueryRAW()
        {
            return
                (SQLite3QueriesHelper.CreateTable <Bill>(
                     true,
                     $"\"{nameof(Bill.Id)}\" integer PRIMARY KEY",
                     $"\"{nameof(Bill.SupplierId)}\" integer NOT NULL",
                     $"\"{nameof(Bill.Code)}\" text",

                     $"\"{nameof(Bill.Amount)}\" real NOT NULL",
                     $"\"{nameof(Bill.Agio)}\" real not null",
                     $"\"{nameof(Bill.AdditionalCosts)}\" real not null",

                     $"\"{nameof(Bill.ReleaseDate)}\" datetime not null",
                     $"\"{nameof(Bill.DueDate)}\" datetime not null",
                     $"\"{nameof(Bill.PaymentDate)}\" datetime",
                     $"\"{nameof(Bill.RegistrationDate)}\" datetime not null default current_date",

                     $"\"{nameof(Bill.Notes)}\" text",

                     $"FOREIGN KEY(\"{nameof(Bill.SupplierId)}\") REFERENCES {nameof(Supplier)}(\"{nameof(Supplier.Id)}\") ON DELETE CASCADE"
                     ));
        }
Example #2
0
 public static string GetCreateTableQueryRAW()
 {
     return
         (SQLite3QueriesHelper.CreateTable <Supplier>(
              true,
              $"{nameof(Supplier.Id)} integer PRIMARY KEY",
              $"{nameof(Supplier.Email)} text",
              $"{nameof(Supplier.Fax)} text",
              $"{nameof(Supplier.Name)} text NOT NULL UNIQUE",
              $"{nameof(Supplier.Notes)} text",
              $"{nameof(Supplier.Phone)} text",
              $"{nameof(Supplier.Website)} text",
              // address
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Address), nameof(Supplier.Address.Country))} text",
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Address), nameof(Supplier.Address.Province))} text",
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Address), nameof(Supplier.Address.City))} text",
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Address), nameof(Supplier.Address.Zip))} text",
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Address), nameof(Supplier.Address.Street))} text",
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Address), nameof(Supplier.Address.Number))} text",
              // agemt
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Agent), nameof(Supplier.Agent.Name))} text",
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Agent), nameof(Supplier.Agent.Surname))} text",
              $"{SQLite3QueriesHelper.BuildColName(nameof(Supplier.Agent), nameof(Supplier.Agent.Phone))} text"));
 }
Example #3
0
 public static string GetCreateTableQuery()
 {
     return(SQLite3QueriesHelper.CreateTable(true, SQLite3SupplierQueries.TableDef.Value.ColumnDefs));
 }