user_table.rs 466 B

123456789101112131415161718192021
  1. use flowy_database::schema::user_table;
  2. #[derive(Clone, Default, Queryable, Identifiable, Insertable)]
  3. #[table_name = "user_table"]
  4. pub struct User {
  5. pub(crate) id: String,
  6. pub(crate) name: String,
  7. password: String,
  8. pub(crate) email: String,
  9. }
  10. impl User {
  11. pub fn new(id: String, name: String, email: String, password: String) -> Self {
  12. Self {
  13. id,
  14. name,
  15. email,
  16. password,
  17. }
  18. }
  19. }