# Model-grid

Links: [1](https://github.com/z-song/laravel-admin/blob/master/docs/en/model-form.md), [2](https://laravel-admin.readthedocs.io/zh_CN/stable/en/model-grid/)

Copy bản mẫu không hoạt động được 😒

```
CREATE TABLE `movies` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `director` int(10) unsigned NOT NULL,
  `describe` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rate` tinyint unsigned NOT NULL,
  `released` enum(0, 1),
  `release_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
```

Thực hiện một số điều chỉnh 🤣

```sql
CREATE TABLE `movies` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `director` int(10) unsigned NOT NULL,
  `describe` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rate` tinyint unsigned NOT NULL,
  `released` enum("0", "1"), -- 👏
  `release_at` datetime NOT NULL DEFAULT "2022-12-02 00:00:00", -- 👏
  `created_at` datetime NOT NULL DEFAULT "2022-12-01 00:00:00", -- 👏
  `updated_at` datetime NOT NULL DEFAULT "2022-12-03 00:00:00", -- 👏
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
```
