tailieunhanh - Agile Web Application Development with Yii 1.1 and PHP5 phần 4

Chúng tôi thấy có một số tùy chọn lệnh có sẵn. Các lệnh điều khiển trông giống như một trong chúng tôi muốn, chúng tôi muốn tạo ra một bộ điều khiển cho các ứng dụng của chúng tôi. Chúng ta có thể | Chapter 6 Designing the schema Back in Chapter 3 The Trackstar Application we proposed some initial ideas about the issue entity. We proposed it have a type an owner a requester a status and a description. We also mentioned when we created the tbl_project table that we would be adding basic audit history information to each table we create to track the dates times and users who update tables. Nothing has changed in the requirements that would alter this approach so we can move ahead with that initial proposal. However types owners requesters and statuses are themselves their own entities. To keep our model flexible and extensible we ll model some of these separately. Owners and requesters are both users of the system and will be referenced to the rows in a table called tbl_user. We have already introduced the idea of a user in the tbl_project table as we added the columns create_user_id and update_user_id to track the identification of the user who initially created the project as well as the user who was responsible for last updating the project details. Even though we have not formally introduced that table yet these fields were modeled to be foreign keys to another table in the database for storing the user data table. The owner_id and requestor_id in the our tbl_issue table will also be foreign keys that relate back to the tbl_user table. We could similarly model the type and status attributes in the same manner. However until our requirements demand this extra complexity in the model we can keep things simple. The type and status columns in the tbl_issue table will remain integer values that map to named types and statuses. Instead of complicating our model by using separate tables we will model these as basic class constant const values within the AR model class we create for the issue entity. Don t worry if all of this is a little fuzzy it will make more sense in the coming sections. Defining some relationships As we are going to be introduced to the .

TỪ KHÓA LIÊN QUAN