#[derive(Model)]
{
// Attributes available to this derive:
#[table]
#[column]
}
Expand description
Automatically implement Model for your struct.
Attributes
table- for structs:table_name: String: optional. Overwrites the table name
column- for struct fields:dtype: String: optional. Overwrites the postgres datatypeunique: bool: optional, default:false. Enables theunqiueconstraint.auto: bool: optional, default:false. This autogenerated the values.column_name: String: optional. Overwrites the column name.