Advertisement
Guest User

Untitled

a guest
Apr 15th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. namespace DataModels
  2. {
  3.     public class User
  4.     {
  5.         public ObjectId _id { get; set; }
  6.         public string Username { get; set; } = "";
  7.         public string Password { get; set; } = "";
  8.         public string Client { get; set; } = "";
  9.         public Characters Characters { get; set; }
  10.  
  11.         public User()
  12.         {
  13.             _id = ObjectId.GenerateNewId();
  14.         }
  15.  
  16.         public User(ObjectId Id, string username, string password, string client)
  17.         {
  18.             this._id = Id;
  19.             this.Username = username;
  20.             this.Password = password;
  21.             this.Client = client;
  22.         }
  23.     }
  24.  
  25.     public class Characters
  26.     {
  27.         public ObjectId _id { get; set; }
  28.         public string FirstName { get; set; } = "";
  29.         public string LastName { get; set; } = "";
  30.  
  31.         public Characters()
  32.         {
  33.             _id = ObjectId.GenerateNewId();
  34.         }
  35.  
  36.         public Characters(ObjectId Id, string firstname, string lastname)
  37.         {
  38.             this._id = Id;
  39.             this.FirstName = firstname;
  40.             this.LastName = lastname;
  41.         }
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement