Example #1
0
 public FakeUserInfo(int id)
 {
     Id            = id;
     JobNumber     = RandomHelper.Next().ToString();
     Name          = FakeName.MakeFakeUserName();
     EntryTime     = RandomHelper.Bool() ? DateTime.Now.Subtract(TimeSpan.FromDays(RandomHelper.Next(2000))) : DateTime.Now.Subtract(TimeSpan.FromHours(RandomHelper.Next(1000)));
     Rank          = (int)DateTime.Now.Subtract(EntryTime).TotalDays * 2 + RandomHelper.Next(1000);
     Sex           = RandomHelper.Bool() ? "男" : "女";
     LastLoginTime = DateTime.Now;
     NickName      = FakeName.MakeFakeUserName();
     GroupName     = FakeName.MakeFakeGroupName();
     for (int i = 0; i < RandomHelper.Next(2, 6); i++)
     {
         Interesting.Add(FakeName.MakeFakeTag());
     }
     Signature = "yooooooooooo";
     Image     = FakeImage.MakeFakeImage();
 }
Example #2
0
        public FakeCommunityInfo()
        {
            CommunityId      = RandomHelper.Next(23432);
            ParentId         = RandomHelper.Bool() ? RandomHelper.Next(234) : 0;
            ParentName       = ParentId > 0 ? FakeName.MakeFakeGroupName() : "";
            Name             = FakeName.MakeFakeCommunityName();
            Image            = FakeImage.MakeFakeImage();
            MasterId         = RandomHelper.Next(23432);
            MemberCount      = RandomHelper.Next(546);
            CreateTime       = RandomHelper.Time();
            Description      = FakeContent.MakeDescription();
            LastActivityTime = RandomHelper.Time();
            CloseTime        = RandomHelper.Bool() ? RandomHelper.Time() : DateTime.MaxValue;

            int tagCount = RandomHelper.Next(10);

            for (int i = 0; i < tagCount; i++)
            {
                Tags.Add(new TagModel());
            }
        }