huntlabs / hunt-entity

An object-relational mapping (ORM) framework for D language (Similar to JPA / Doctrine), support PostgreSQL and MySQL.

Home Page:https://www.huntlabs.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add entity valid use hunt.validation

zoujiaqing opened this issue · comments

@gaoxincheng , like code:

class User : Model
{
    mixin MakeEntity;

    @Length(6, 24)
    string username;
}
  1. Model extend of hunt.validation.Valid;
  2. MakeEntity generate valid code;