Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @Created and @Updated annotations to Entity define #20

Open
zoujiaqing opened this issue Feb 1, 2019 · 0 comments
Open

Add @Created and @Updated annotations to Entity define #20

zoujiaqing opened this issue Feb 1, 2019 · 0 comments

Comments

@zoujiaqing
Copy link
Member

zoujiaqing commented Feb 1, 2019

Add annotations:

  1. Created : Get the timestamp automatically at creation time.
  2. Updated : Get the timestamp automatically at update time.

Sample code:

import hunt.entity;

class User
{
    @PrimaryKey
    int id;

    string name;

    @Created
    int created;

    @Updated
    int updated;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant