2017-06-05 12:20:39 +00:00
|
|
|
|
using System;
|
2017-06-02 21:02:48 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2017-06-05 12:20:39 +00:00
|
|
|
|
using System.Linq;
|
2017-06-06 21:13:25 +00:00
|
|
|
|
using System.Net;
|
2017-06-05 12:20:39 +00:00
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2017-06-01 20:54:32 +00:00
|
|
|
|
|
2017-06-02 21:02:48 +00:00
|
|
|
|
namespace CircleScape.DAL {
|
|
|
|
|
public partial class Session {
|
2017-06-01 20:54:32 +00:00
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
2017-06-05 12:20:39 +00:00
|
|
|
|
[ForeignKey("User")]
|
|
|
|
|
public int UserId { get; set; }
|
2017-06-02 21:02:48 +00:00
|
|
|
|
public virtual User User { get; set; }
|
2017-06-01 20:54:32 +00:00
|
|
|
|
|
2017-06-06 21:13:25 +00:00
|
|
|
|
protected string RawIp { get; set; }
|
|
|
|
|
public IPAddress Ip {
|
|
|
|
|
get {
|
|
|
|
|
return IPAddress.Parse(RawIp);
|
|
|
|
|
}
|
|
|
|
|
set {
|
|
|
|
|
RawIp = value.ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-06-05 12:20:39 +00:00
|
|
|
|
|
2017-06-06 21:13:25 +00:00
|
|
|
|
public int ServerId { get; set; }
|
2017-06-01 20:54:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|