# Faya Use Case ### Store Management Le store appartient à un business. Un business peut avoir plusieurs store. Un businnes peut avoir pluieurs personnels. Pour un depart on prendra en compte une seule personne (personne principale). Un store peut avoir plusieurs produits. Un produit peut avoir plusieurs variantes. - Business : * id: unique identifier of business in the system. * name: unique name of business * adress: general adress of businness * contact: mail, phone, website general of business. * status: Status of businnes (new, active, suspended, closed) * createAt : Created date of business * lastUpdate: last update of business infos. - Store: * id: unique identifier of store in the system. * name: unique name of store * adress: adress of store * contact: mail, phone, website of store. * status: Status of store (active, suspended, closed) * market: (various,electronic) * type: type of store (retail, wareHouse, wholesale, producer) * createAt : Created date of store * lastUpdate: last update of store infos. * businessId: unique identifier of business * workHours: workHours of store. * logo: logo of the businness * photo: photo of store emplacement * description: Description of store - Staff: * id * firstName * lastName * phone * mail * password * pinCode * createAt : Created date of staff * lastUpdate: last update of staff infos. * role: owner, manager, dafault * businessId: id of business of staff. * stores: list of store the staff work on * status: new, active, suspended, closed * photo: staff profil photo - Products: * id: identifier of the product * name: unique name of the product * description: text describing the product * photo: the default photo of the product * category: the category of the product * createAt : Created date of product * lastUpdate: last update of product infos. - Variants: * id: id of the variant * productId: the id of the product * sku: sku identifier of the variant * barCode: the product bar code * color: the color of the variant * position: the order of the variant in the product * unit: unit of the variant to be sale * size: the dimension of the product * weight: the product weight in KG * photos: list of the variant image * expireIn: date of the product expiration * produceAt: date of the product manufacturing * createAt : Created date of variant * lastUpdate: last update of variant infos. - Category: * id: unique identifier of the category * name: name of the category * parent: reference to another category if exist * photo: photo of the category * createAt : Created date of category * lastUpdate: last update of category infos. - stock: * id: unique identifier of the stock * storeId: id of the related store * variantId: sku of the related variant * quantities: quantities of the variant in the store * price: the price of the variant * lastUpdate: the last time the stock infos was update ### USER STORY: - Open BUSINESS ACCOUNT (By Faya staff) - Login to the Business account (staff) - Create product. - Increase/Decrease stock of the store - New sale (prepare cart, prepare facture and cash in). ```gherkin= Feature: Open Faya Bussiness Account Scenario: Create business account and owner account Given a valid business name And a valid owner phone, fisrtName, lastName, password, codePin. When he submit the forms. Then the accounts shouled be created with status new And the confirmation code shouled be sent in sms to the phone number Scenario: Validate Faya Businness owner account Given a valid confirmation code and owner phone number When account validation is request Then the owner and associated bussiness account status must be set to active And Confirmation sms for validation account must be sent to the phone number. Scenario: Create store Given name, type, market, address of store When the store creation is request Then An active store should be created ``` ### Delivery Management