rendered paste bodyusing Castle.ActiveRecord;
using NetCoders.Model.Validators;
namespace NetCoders.Model.User
{
[ActiveRecord("UsersProfiles")]
public partial class UserProfile : ActiveRecordBase<UserProfile>
{
#region Fields
private int _userId;
private string _birthDay;
private string _location;
private string _homePage;
private string _icq;
private string _aim;
private string _msn;
private string _yahoo;
private string _skype;
private int _posts;
private User _user;
#endregion
#region Properties
[PrimaryKey(PrimaryKeyType.Foreign, "UserID")]
public int UserID
{
get
{
return _userId;
}
set
{
_userId = value;
}
}
[
Property("BirthDay", NotNull = true),
LocalizeValidateNonEmpty("Error_UserBirthDayEmpty")
]
public string BirthDay
{
get
{
return _birthDay;
}
set
{
_birthDay = value;
}
}
[Property("Location", NotNull = false)]
public string Location
{
get
{
return _location;
}
set
{
_location = value;
}
}
[Property("HomePage", NotNull = false)]
public string HomePage
{
get
{
return _homePage;
}
set
{
_homePage = value;
}
}
[Property("Icq", NotNull = false)]
public string Icq
{
get
{
return _icq;
}
set
{
_icq = value;
}
}
[Property("Aim", NotNull = false)]
public string Aim
{
get
{
return _aim;
}
set
{
_aim = value;
}
}
[Property("Msn", NotNull = false)]
public string Msn
{
get
{
return _msn;
}
set
{
_msn = value;
}
}
[Property("Yahoo", NotNull = false)]
public string Yahoo
{
get
{
return _yahoo;
}
set
{
_yahoo = value;
}
}
[Property("Skype", NotNull = false)]
public string Skype
{
get
{
return _skype;
}
set
{
_skype = value;
}
}
[Property("Posts", NotNull = true)]
public int Posts
{
get
{
return _posts;
}
set
{
_posts = value;
}
}
[OneToOne]
public User User
{
get
{
return _user;
}
set
{
_user = value;
}
}
#endregion
}
}