Фиксы, добавление функционала
d2f32e94
Oliver Naix
committed
19 changed files
appsettings.json
/GoCrimea.API/appsettings.json-1+1
/GoCrimea.API/appsettings.json
Add comment 1 {
Add comment 2 "ConnectionStrings": {
Add comment 3 Minus   "DefaultConnection": "Data Source=DESKTOP-RRI29R1\\SQLEXPRESS;Initial Catalog=GoRussia;Integrated Security=True;Pooling=False"
Add comment 3 Plus   "DefaultConnection": "Data Source=localhost\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True;Pooling=False"
Add comment 4 },
Add comment 5 "Logging": {
Add comment 6 "LogLevel": {
Startup.cs
/GoCrimea.API/Startup.cs+2
/GoCrimea.API/Startup.cs
Add comment 57 services.AddTransient<IProfileService, ProfileService>();
Add comment 58 services.AddTransient<ISaver, Saver>();
Add comment 59 services.AddTransient<UserService>();
Add comment 60 Plus  
Add comment 60 61 services.AddControllers();
Add comment 62 Plus  
Add comment 61 63 services.AddDbContext<ApplicationContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
Add comment 62 64 services.AddIdentity<DBUser, IdentityRole>()
Add comment 63 65 .AddEntityFrameworkStores<ApplicationContext>()
RouteDTO.cs
/GoCrimea.BLL/Contracts/Models/RouteDTO.cs+2
/GoCrimea.BLL/Contracts/Models/RouteDTO.cs
Add comment 1 using System;
Add comment 2 using System.Collections.Generic;
Add comment 3 Plus  using System.ComponentModel.DataAnnotations.Schema;
Add comment 3 4 using System.Linq;
Add comment 4 5 using System.Text;
Add comment 5 6 using System.Threading.Tasks;
Add comment 14 15 public string UserId { get; set; }
Add comment 15 16 public int Price { get; set; }
Add comment 16 17 public DateTime DateTime { get; set; }
Add comment 18 Plus   [NotMapped]
Add comment 17 19 public List<string> TravelersId { get; set; }
Add comment 18 20 }
Add comment 19 21 }
DBRoute.cs
/GoCrimea.DAL/Entities/DBRoute.cs+2
/GoCrimea.DAL/Entities/DBRoute.cs
Add comment 1 using System;
Add comment 2 using System.Collections.Generic;
Add comment 3 Plus  using System.ComponentModel.DataAnnotations.Schema;
Add comment 3 4 using System.Linq;
Add comment 4 5 using System.Text;
Add comment 5 6 using System.Threading.Tasks;
Add comment 14 15 public int Price { get; set; }
Add comment 15 16 public string UserId { get; set; }
Add comment 16 17 public DateTime DateTime { get; set; }
Add comment 18 Plus   [NotMapped]
Add comment 17 19 public List<string> TravelersId { get; set; }
Add comment 18 20 }
Add comment 19 21 }
DBUser.cs
/GoCrimea.DAL/Entities/DBUser.cs-1+1
/GoCrimea.DAL/Entities/DBUser.cs
Add comment 9 {
Add comment 10 public class DBUser : IdentityUser
Add comment 11 {
Add comment 12 Minus   public string AvatarUrl { get; set; }//ссылка на аватар на сервере
Add comment 12 Plus   public string AvatarUrl { get; set; } //ссылка на аватар на сервере
Add comment 13 public string Car { get; set; }//марка машины
Add comment 14 public int PlaceCount { get; set; }// колво мест в машине(общее)
Add comment 15 public string Birthday { get; set; }
KeyCommand.cs
/GoCrimea.VKBot/Bot/Commands/KeyCommand.cs+32
/GoCrimea.VKBot/Bot/Commands/KeyCommand.cs
Add comment 1 Plus  using GoCrimea.VkBot.Bot.Models;
Add comment 2 Plus  using System;
Add comment 3 Plus  using System.Collections.Generic;
Add comment 4 Plus  using System.Linq;
Add comment 5 Plus  using System.Threading.Tasks;
Add comment 6 Plus  using VkNet.Model;
Add comment 7 Plus  
Add comment 8 Plus  namespace GoCrimea.VkBot.Bot.Commands
Add comment 9 Plus  {
Add comment 10 Plus   public class KeyCommand : Command
Add comment 11 Plus   {
Add comment 12 Plus   public override string TriggerWord => "Код";
Add comment 13 Plus  
Add comment 14 Plus   public override void Execute(Message message)
Add comment 15 Plus   {
Add comment 16 Plus   string messageText;
Add comment 17 Plus  
Add comment 18 Plus   if (string.IsNullOrEmpty(UserDTOMaster.GetUserById(message.UserId).Phone))
Add comment 19 Plus   messageText = "Некорректный номер телефона";
Add comment 20 Plus   else
Add comment 21 Plus   messageText = "Введите код.";
Add comment 22 Plus  
Add comment 23 Plus   AppSettings.VkApi.Messages.Send(new VkNet.Model.RequestParams.MessagesSendParams()
Add comment 24 Plus   {
Add comment 25 Plus   RandomId = random.Next(int.MinValue, int.MaxValue),
Add comment 26 Plus   PeerId = message.UserId,
Add comment 27 Plus   Message = messageText
Add comment 28 Plus   });
Add comment 29 Plus   }
Add comment 30 Plus   }
Add comment 31 Plus  }
Add comment 32 Plus  
PhoneCommand.cs
/GoCrimea.VKBot/Bot/Commands/PhoneCommand.cs
/GoCrimea.VKBot/Bot/Commands/PhoneCommand.cs
RegistrationCommand.cs
/GoCrimea.VKBot/Bot/Commands/RegistrationCommand.cs
/GoCrimea.VKBot/Bot/Commands/RegistrationCommand.cs
Keyboard.cs
/GoCrimea.VKBot/Bot/Keyboard/Keyboard.cs
/GoCrimea.VKBot/Bot/Keyboard/Keyboard.cs
VKController.cs
/GoCrimea.VKBot/Controllers/VKController.cs
/GoCrimea.VKBot/Controllers/VKController.cs
appsettings.json
/GoCrimea.VKBot/appsettings.json
/GoCrimea.VKBot/appsettings.json
GoCrimea.VKBot.csproj
/GoCrimea.VKBot/GoCrimea.VKBot.csproj
/GoCrimea.VKBot/GoCrimea.VKBot.csproj
Startup.cs
/GoCrimea.VKBot/Startup.cs
/GoCrimea.VKBot/Startup.cs
AppSettings.cs
/GoCrimea.VkBot/Bot/Models/AppSettings.cs
/GoCrimea.VkBot/Bot/Models/AppSettings.cs
BotMaster.cs
/GoCrimea.VkBot/Bot/BotMaster.cs
/GoCrimea.VkBot/Bot/BotMaster.cs
CommandMaster.cs
/GoCrimea.VkBot/Bot/CommandMaster.cs
/GoCrimea.VkBot/Bot/CommandMaster.cs
ParseMaster.cs
/GoCrimea.VkBot/Bot/ParseMaster.cs
/GoCrimea.VkBot/Bot/ParseMaster.cs
UserDTOMaster.cs
/GoCrimea.VkBot/Bot/UserDTOMaster.cs
/GoCrimea.VkBot/Bot/UserDTOMaster.cs
UserMaster.cs
/GoCrimea.VkBot/Bot/UserMaster.cs
/GoCrimea.VkBot/Bot/UserMaster.cs