ruskit 0.1.5

A modern web framework for Rust inspired by Laravel
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::app::entities::User;
use crate::framework::database::factory::Factory;
use fake::{Fake, Faker};

pub struct UserFactory;

impl Factory for User {
    fn definition() -> Self {
        User {
            id: 0,
            name: Faker.fake(),
            email: Faker.fake(),
            created_at: chrono::Utc::now().timestamp(),
            updated_at: chrono::Utc::now().timestamp(),
        }
    }
}