rust_firefly 开发脚手架,使用ymal 作为sql文件
Layui: https://www.layui.com/demo/
juicer: https://github.com/PaulGuo/Juicer
Actix框架: https://actix.rs/
handlebars: https://github.com/sunng87/handlebars-rust
rbatis:https://github.com/rbatis/rbatis
rust: 1.40+ / Mysql: 5.6+
git clone https://github.com/wzhsh90/rust_firefly.git
cd rust_firefly
CREATE TABLE `sys_company_t`
(
`id` char(24) NOT NULL,
`com_name` varchar(100) DEFAULT NULL,
`com_desc` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
table_name:
sys_company_t
base_sql:
id,com_name,com_desc
exist_name:
select count(*) from ${table_name} where com_name=#{name}
update:
update ${table_name} set com_name=#{com_name},com_desc=#{com_desc} where id=#{id}
list: |
select ${base_sql} from ${table_name}
if name != '':
where com_name like #{name}
***** * 默认用户/名称: FireFly / firefly
默认运行开发模式
cargo run= cargo run dev
cargo run #开发模式: cargo run dev
cargo run #生产模式: cargo run prod