| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using InvercargillSql.Orm;
- using Inversion;
- namespace Spry.Authentication {
- /**
- * Persistent user account row (`spry_users`). Passwords are stored as
- * libsodium hashes via {@link UserService}.
- */
- public class UserEntity : Object {
- public int64 id { get; set; }
- public string username { get; set; }
- public string email { get; set; }
- public string forename { get; set; }
- public string surname { get; set; }
- public string password_hash { get; set; }
- public DateTime date_of_birth { get; set; }
- public DateTime created { get; set; }
- public DateTime modified { get; set; }
- public bool enabled { get; set; }
- public static void entity_mapping(EntityMapperBuilder<UserEntity> cfg) {
- cfg.table("spry_users")
- .column<int64?>("id", o => o.id, (o, v) => o.id = v)
- .column<string>("username", o => o.username, (o, v) => o.username = v)
- .column<string>("email", o => o.email, (o, v) => o.email = v)
- .column<string>("forename", o => o.forename, (o, v) => o.forename = v)
- .column<string>("surname", o => o.surname, (o, v) => o.surname = v)
- .column<string>("password_hash", o => o.password_hash, (o, v) => o.password_hash = v)
- .column<DateTime>("date_of_birth", o => o.date_of_birth, (o, v) => o.date_of_birth = v)
- .column<DateTime>("created", o => o.created, (o, v) => o.created = v)
- .column<DateTime>("modified", o => o.modified, (o, v) => o.modified = v)
- .column<bool>("enabled", o => o.enabled, (o, v) => o.enabled = v);
- }
- }
- }
|