implement osis actor
This commit is contained in:
27
examples/scripts/product.rhai
Normal file
27
examples/scripts/product.rhai
Normal file
@@ -0,0 +1,27 @@
|
||||
// product.rhai
|
||||
|
||||
// Create a product component
|
||||
let component = new_product_component()
|
||||
.name("Sub-component A")
|
||||
.description("A vital part of the main product.")
|
||||
.quantity(10);
|
||||
|
||||
print("New Product Component:");
|
||||
print(component);
|
||||
|
||||
// Create a product and add the component
|
||||
let new_product = new_product()
|
||||
.name("Super Product")
|
||||
.description("A product that does amazing things.")
|
||||
.price(99.99)
|
||||
.type("Product")
|
||||
.category("Gadgets")
|
||||
.status("Available")
|
||||
.max_amount(100)
|
||||
.purchase_till(1735689600) // Future timestamp
|
||||
.active_till(1735689600) // Future timestamp
|
||||
.add_component(component)
|
||||
.save_product();
|
||||
|
||||
print("\nNew Product:");
|
||||
print(new_product);
|
Reference in New Issue
Block a user