In the previous article we knew about the procurement requirements. In this article we need to look at how the database of the purchase order module is built.
We design with two tables:
1: Purchase order basic Information Form (YYCGD):
That is, on the corresponding page:
Of course, when we design the database, it's impossible to have only these fields. Let's look at how the real database is designed:
Let's take a look at the meanings of these fields:
Purchase number: Equivalent to the order code, convenient management needs
Purchase order Name: Short description of the purchase order, name
Hospital ID: The ID of the purchase order unit that was created (the record unit ID instead of the user's ID) (foreign key)
Contact Person: Contact Han A single person may not be alone
Phone: Contact person's phone
Build single: Create purchase order User ID
Build single time: Create purchase order time, (it is recommended not to set the default value in the database, the maintenance of business fields uniform in service)
Time of submission: Purchase order is created, time is recorded when the purchase order is submitted
Remark: Purchase order note information
Purchase order Status: (Business code store data dictionary: 1: Uncommitted, 2: Submitted unaudited, 3: Approved, 4: Audit not approved)
Audit Opinion: The supervision unit to the purchase order examination Opinion
Audit Time: The regulatory unit on the purchase order approval time
for auditing, note: If auditing business functions are complex and demand changes are likely, it is recommended that separate Create an audit table to record audit information.
2: Purchase Order Details table:
This table corresponds to the following:
037 Medical Project-Module IV: Purchase order module-Purchase order data model