cargo new name-of-your-app
[dependencies] actix-web = "4"
cargo install sea-orm-cli
sea-orm-cli migrate init
sea-orm-cli migrate generate name_of_migration
sea-orm-cli migrate up
sea-orm-cli generate entity -u protocol://username:password@localhost/bakery -o entity/src
Model is for read operations only. To perform insert, update, or delete, you need to use ActiveModel which attaches meta-data on each attribute.