Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
var employees = {
name: 'Employees',
columns: [
new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
new jsstore_1.Column('lastName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('birthDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
new jsstore_1.Column('photo').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('notes').setDataType(jsstore_1.DATA_TYPE.String),
]
};
var order_details = {
name: 'OrderDetails',
columns: [
new jsstore_1.Column('orderDetailId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
new jsstore_1.Column('productId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
new jsstore_1.Column('quantity').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
]
};
var orders = {
name: 'Orders',
columns: [
new jsstore_1.Column('orderId').options([jsstore_1.COL_OPTION.PrimaryKey]),
new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
new jsstore_1.Column('employeeId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number),
new jsstore_1.Column('orderDate').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.DateTime),
new jsstore_1.Column('shipperId').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.Number)
]
};
var products = {
name: 'Products',
DemoService.prototype.getDbSchema = function () {
var customers = {
name: 'Customers',
columns: [
new jsstore_1.Column('customerId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
new jsstore_1.Column('customerName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('contactName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('address').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('city').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('postalCode').setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('country').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String)
]
};
var categories = {
name: 'Categories',
columns: [
new jsstore_1.Column('categoryId').options([jsstore_1.COL_OPTION.PrimaryKey, jsstore_1.COL_OPTION.AutoIncrement]),
new jsstore_1.Column('categoryName').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
new jsstore_1.Column('description').options([jsstore_1.COL_OPTION.NotNull]).setDataType(jsstore_1.DATA_TYPE.String),
]
};