rorm
rorm copied to clipboard
Support database-level constraints on columns
It would be nice to see support for check constraints which are based on database features. Of course, the support for those must be evaluated first. Below is a short example how using the constraints could look like, but I'm open for other suggestions as well:
#[derive(Clone, Debug, Model)]
struct User {
#[rorm(id)]
id: i64,
#[rorm(max_length = 255)]
username: String,
#[rorm(unsigned)]
age: i32,
#[rorm(constraint = "< 1337")]
score: i32
}