---
# System prepended metadata

title: Backend in phase 2
tags: [Archived]

---

# Backend in phase 2

###### tags: `Archived`
1. new data structure
- link: https://diagrams.visual-paradigm.com/#workspace=tswnkdim&proj=0&id=10
- reference: ![](https://i.imgur.com/bnexIUO.png)


2. sample sealing v3.0
    - when WBA select sample to be sent to WBA directly
    - task cost $0
    - Once supplier opened task,
        1. input tracking number & delivery date (To WBA)
        2. Need input return sample party address?
        3. status changes to waiting for WBA for approval

3. Excel import
    - to import raw data from new program
    - POST request to accept excel file with format

Changes made:
---
Create table SmTestMasterWic
| Action | Column |
| --- | --- |
| Add   | wicNumber |
| Add   | productName |

Create table SmTestSubWic

SmTestProduct -> SmTestSubWic
| Action | Column | New column Name (if changed) |
| --- | --- | --- |
| Move   | wicNumber |
| Move   | productName |
| Move   | assortmentDetails | description |
| Move   | samplePhotos | samplePhotos(SM_TEST_SUB_WIC_2_SAMPLE_PHOTO [ TEST_SUB_WIC_ID,SAMPLE_PHOTO_ID ] |
| Move   | ageGrade |
| Move   | foodContact |
| Association | testProduct | testMasterWic |

Delete table SmTestProduct

SmTestProject -> SmTestSubWic
| Action | Column |
| --- | --- |
| Move   | testProductCategory |

Create table SmTestAssortment
| Action | Column |
| --- | --- |
| Add | description |
| Add | testSubWic |

Create table SmTestSubWicProgress
| Action | Column |
| --- | --- |
| Add | createTime |
| Association | testSubWic |
| Association | testProject |
| Add | progressQualityTest | 
| Add | progressPreSafetyTest | 
| Add | progressSampleSealing | 
| Add | progressSamplePickUp | 
| Add | progressSafetyTesting | 
| Add | progressDuringProductionInspection | 
| Add | progressFinalRandomInspection | 

Create table SmTestProjectComment
| Action | Column |
| --- | --- |
| Add | createTime |
| Association | user |
| Association | testProject |
| Add | content | 

Table SmTestInvoice
| Action | Column |
| --- | --- |
| Add | invoiceType |
| Add | payeeName |
| Add | payeeAddress |
| Add | payeeContactPerson |
| Add | payeeEmail |
| Add | taxRegistrationCode |
| Add | nameOnVatInvoice |
| Add | addressOnVatInvoice |
| Add | bankNameOnVatInvoice |
| Add | contactNumberOnVatInvoice |
| Add | bankAddressOnVatInvoice |
| Association | sm_test_invoice_2_other_attachment |

Create Table smTestInvoice2OtherAttachment

Table SmTestProject
| Add | actualDepartureDate |

Table SmTestTask
| Add | plannedDate |
| Add | completionDate |
