4 studio usage
This commit is contained in:
@ -148,7 +148,7 @@ function GenPrice(max = 1000) {
|
||||
|
||||
const ClassTypes = ['Theory', 'Practice']
|
||||
const RegistrationStatuses = ['NotPaid', 'Paid']
|
||||
const EquipmentUsageTypes = ['PayOnce', 'PayMonthly']
|
||||
const UsageTypes = ['PayOnce', 'PayMonthly']
|
||||
|
||||
const COUNT = 10
|
||||
|
||||
@ -196,8 +196,8 @@ script += 'INSERT INTO "Client" ("Person_id", phone, email, billing_account) ' +
|
||||
})
|
||||
|
||||
// Studio
|
||||
script += 'INSERT INTO "Studio" (address, capacity, begin_date, duration) ' + Values(() => {
|
||||
return `(${GenAddress()}, ${GenInt(10, 80)}, ${GenTimestamp()}, ${GenIntervalHours(12)})`
|
||||
script += 'INSERT INTO "Studio" (address, capacity, begin_date, duration, usage_price, usage_type) ' + Values(() => {
|
||||
return `(${GenAddress()}, ${GenInt(10, 80)}, ${GenTimestamp()}, ${GenIntervalHours(12)}, ${GenPrice(300)}, '${UsageTypes[GenMaxUInt(UsageTypes.length)]}')`
|
||||
})
|
||||
|
||||
// Course
|
||||
@ -232,7 +232,7 @@ script += Many(`INSERT INTO "FoodProduct" ("FoodProductEnum_id", "Class_begin_da
|
||||
|
||||
// Equipment
|
||||
script += 'INSERT INTO "Equipment" ("Studio_id", name, usage_price, usage_type, delivery_price, delivery_date) ' + Values(() => {
|
||||
return `(${GenInt(1, COUNT + 1)}, 'оборудование ${GenMaxUInt(100)}', ${GenPrice(300)}, '${EquipmentUsageTypes[GenMaxUInt(EquipmentUsageTypes.length)]}', ${GenPrice(200)}, ${GenTimestamp()})`
|
||||
return `(${GenInt(1, COUNT + 1)}, 'оборудование ${GenMaxUInt(100)}', ${GenPrice(300)}, '${UsageTypes[GenMaxUInt(UsageTypes.length)]}', ${GenPrice(200)}, ${GenTimestamp()})`
|
||||
})
|
||||
|
||||
// Class_Equipment
|
||||
|
||||
Reference in New Issue
Block a user