Laravel HasMany关系数据库设计

时间:2018-08-23 15:09:36

标签: mysql database laravel

我有2个表格的提案和提案附件。每个投标都有一个docx文件和Pdf文件。让我知道下表的设计是正确的

提案和proposal_attachments


    | id | proposalNo | ProposalTitle | Status |
    --------------------------------------------
    | 1  |  PRO 123  | sample         | 0      |
    --------------------------------------------

-----------------------------------------------------------------------
| id | proposal_id | version_ID |  Status  |    fileName    | filetype   | 
------------------------------------------------------------------------
|  1  |        1   | 1          |     1    |  Sample1.docx  | doctype   |
------------------------------------------------------------------------
|  2  |        1   | 1          |     1    |  Sample1.pdf   |   pdf     |
------------------------------------------------------------------------
|  3  |        1   | 2          |     1    |  Sample2.docx  | doctype   |
------------------------------------------------------------------------  
|  4  |        1   | 2          |     1    |  Sample2.pdf   | pdf       |
------------------------------------------------------------------------  

应使用类似

|id| proposal_id|version_ID |Status|filetitle|fileNamedoc|fileNamePDF

0 个答案:

没有答案