Nhập câu lệnh SQL (MySQL)
-- Create the Book table CREATE TABLE IF NOT EXISTS Book ( BookID INT PRIMARY KEY AUTO_INCREMENT, BookName VARCHAR(255) NOT NULL, Author VARCHAR(255), PublicationYear INT, CategoryID INT, PublisherID INT, Quantity INT NOT NULL DEFAULT 0, Price DECIMAL(10, 2) NOT NULL DEFAULT 0, DiscountPrice DECIMAL(10, 2) NOT NULL DEFAULT 0, FOREIGN KEY (CategoryID) REFERENCES Category(CategoryID), FOREIGN KEY (PublisherID) REFERENCES Publisher(PublisherID) );
Chuyển đổi từ SQL
{ "class_name": "Product", "fields": [ { "name": "id", "type": "int", "auto_increment": true, "is_primary": true, "constraints": ["@NotNull"] }, { "name": "name", "type": "String", "auto_increment": false, "is_primary": false, "constraints": ["@NotEmpty", "@Length(max = 100)"] }, { "name": "price", "type": "double", "auto_increment": false, "is_primary": false, "constraints": ["@NotNull", "@Range(min = 0)"] } ] }
Temp Variable
Thêm dữ liệu vào temp_variable
Generate Entity Code
Generate DAO Interface
Generate DAO Implementation
Generate Controller
Generate Detail View
Generate Index View
Generate Add View
Generate Edit View
Download Zip
Download Base
Output
Copy Output