Skip to content
This repository was archived by the owner on Apr 21, 2023. It is now read-only.

Commit 0a29c80

Browse files
author
envyvox
committed
cleanup; using tabs instead of whitespaces.
1 parent a3b7c6f commit 0a29c80

File tree

297 files changed

+14955
-14886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+14955
-14886
lines changed

.vscode/launch.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8+
"name": ".NET Core Launch (web)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/Disfarm/bin/Debug/net5.0/Disfarm.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}/Disfarm",
16+
"stopAtEntry": false,
17+
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
18+
"serverReadyAction": {
19+
"action": "openExternally",
20+
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
21+
},
22+
"env": {
23+
"ASPNETCORE_ENVIRONMENT": "Development"
24+
},
25+
"sourceFileMap": {
26+
"/Views": "${workspaceFolder}/Views"
27+
}
28+
},
29+
{
30+
"name": ".NET Core Attach",
31+
"type": "coreclr",
32+
"request": "attach"
33+
}
34+
]
35+
}

.vscode/tasks.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/Disfarm/Disfarm.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/Disfarm/Disfarm.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"--project",
36+
"${workspaceFolder}/Disfarm/Disfarm.csproj"
37+
],
38+
"problemMatcher": "$msCompile"
39+
}
40+
]
41+
}

Disfarm.Data/AppDbContext.cs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,49 @@
77

88
namespace Disfarm.Data
99
{
10-
public class AppDbContext : DbContext
11-
{
12-
public AppDbContext(DbContextOptions options) : base(options)
13-
{
14-
}
10+
public class AppDbContext : DbContext
11+
{
12+
public AppDbContext(DbContextOptions options) : base(options)
13+
{
14+
}
1515

16-
protected override void OnModelCreating(ModelBuilder modelBuilder)
17-
{
18-
base.OnModelCreating(modelBuilder);
16+
protected override void OnModelCreating(ModelBuilder modelBuilder)
17+
{
18+
base.OnModelCreating(modelBuilder);
1919

20-
modelBuilder.ApplyConfigurationsFromAssembly(GetType().Assembly);
21-
modelBuilder.UseEntityTypeConfiguration<AppDbContext>();
22-
modelBuilder.UseSnakeCaseNamingConvention();
23-
modelBuilder.UseValueConverterForType<DateTime>(new DateTimeUtcKindConverter());
24-
}
20+
modelBuilder.ApplyConfigurationsFromAssembly(GetType().Assembly);
21+
modelBuilder.UseEntityTypeConfiguration<AppDbContext>();
22+
modelBuilder.UseSnakeCaseNamingConvention();
23+
modelBuilder.UseValueConverterForType<DateTime>(new DateTimeUtcKindConverter());
24+
}
2525

26-
public DbSet<User> Users { get; set; }
27-
public DbSet<UserAchievement> UserAchievements { get; set; }
28-
public DbSet<UserBanner> UserBanners { get; set; }
29-
public DbSet<UserBuilding> UserBuildings { get; set; }
30-
public DbSet<UserCollection> UserCollections { get; set; }
31-
public DbSet<UserContainer> UserContainers { get; set; }
32-
public DbSet<UserCooldown> UserCooldowns { get; set; }
33-
public DbSet<UserCrop> UserCrops { get; set; }
34-
public DbSet<UserCurrency> UserCurrencies { get; set; }
35-
public DbSet<UserDailyReward> UserDailyRewards { get; set; }
36-
public DbSet<UserEffect> UserEffects { get; set; }
37-
public DbSet<UserFarm> UserFarms { get; set; }
38-
public DbSet<UserFish> UserFishes { get; set; }
39-
public DbSet<UserMovement> UserMovements { get; set; }
40-
public DbSet<UserReferrer> UserReferrers { get; set; }
41-
public DbSet<UserSeed> UserSeeds { get; set; }
42-
public DbSet<UserStatistic> UserStatistics { get; set; }
43-
public DbSet<UserTitle> UserTitles { get; set; }
26+
public DbSet<User> Users { get; set; }
27+
public DbSet<UserAchievement> UserAchievements { get; set; }
28+
public DbSet<UserBanner> UserBanners { get; set; }
29+
public DbSet<UserBuilding> UserBuildings { get; set; }
30+
public DbSet<UserCollection> UserCollections { get; set; }
31+
public DbSet<UserContainer> UserContainers { get; set; }
32+
public DbSet<UserCooldown> UserCooldowns { get; set; }
33+
public DbSet<UserCrop> UserCrops { get; set; }
34+
public DbSet<UserCurrency> UserCurrencies { get; set; }
35+
public DbSet<UserDailyReward> UserDailyRewards { get; set; }
36+
public DbSet<UserEffect> UserEffects { get; set; }
37+
public DbSet<UserFarm> UserFarms { get; set; }
38+
public DbSet<UserFish> UserFishes { get; set; }
39+
public DbSet<UserMovement> UserMovements { get; set; }
40+
public DbSet<UserReferrer> UserReferrers { get; set; }
41+
public DbSet<UserSeed> UserSeeds { get; set; }
42+
public DbSet<UserStatistic> UserStatistics { get; set; }
43+
public DbSet<UserTitle> UserTitles { get; set; }
4444

45-
public DbSet<Achievement> Achievements { get; set; }
46-
public DbSet<Banner> Banners { get; set; }
47-
public DbSet<Crop> Crops { get; set; }
48-
public DbSet<Fish> Fishes { get; set; }
49-
public DbSet<Image> Images { get; set; }
50-
public DbSet<Localization> Localizations { get; set; }
51-
public DbSet<Seed> Seeds { get; set; }
52-
public DbSet<WorldProperty> WorldProperties { get; set; }
53-
public DbSet<WorldState> WorldStates { get; set; }
54-
}
45+
public DbSet<Achievement> Achievements { get; set; }
46+
public DbSet<Banner> Banners { get; set; }
47+
public DbSet<Crop> Crops { get; set; }
48+
public DbSet<Fish> Fishes { get; set; }
49+
public DbSet<Image> Images { get; set; }
50+
public DbSet<Localization> Localizations { get; set; }
51+
public DbSet<Seed> Seeds { get; set; }
52+
public DbSet<WorldProperty> WorldProperties { get; set; }
53+
public DbSet<WorldState> WorldStates { get; set; }
54+
}
5555
}

Disfarm.Data/Converters/DateTimeUtcKindConverter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
namespace Disfarm.Data.Converters
55
{
6-
public class DateTimeUtcKindConverter : ValueConverter<DateTime, DateTime>
7-
{
8-
public DateTimeUtcKindConverter() : base(x => x, x => DateTime.SpecifyKind(x, DateTimeKind.Utc))
9-
{
10-
}
11-
}
6+
public class DateTimeUtcKindConverter : ValueConverter<DateTime, DateTime>
7+
{
8+
public DateTimeUtcKindConverter() : base(x => x, x => DateTime.SpecifyKind(x, DateTimeKind.Utc))
9+
{
10+
}
11+
}
1212
}

Disfarm.Data/Entities/Achievement.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@
66

77
namespace Disfarm.Data.Entities
88
{
9-
public class Achievement : ICreatedEntity
10-
{
11-
public Enums.Achievement Type { get; set; }
12-
public AchievementRewardType RewardType { get; set; }
13-
public uint RewardNumber { get; set; }
14-
public uint Points { get; set; }
15-
public DateTimeOffset CreatedAt { get; set; }
16-
}
9+
public class Achievement : ICreatedEntity
10+
{
11+
public Enums.Achievement Type { get; set; }
12+
public AchievementRewardType RewardType { get; set; }
13+
public uint RewardNumber { get; set; }
14+
public uint Points { get; set; }
15+
public DateTimeOffset CreatedAt { get; set; }
16+
}
1717

18-
public class AchievementConfiguration : IEntityTypeConfiguration<Achievement>
19-
{
20-
public void Configure(EntityTypeBuilder<Achievement> builder)
21-
{
22-
builder.HasKey(x => x.Type);
23-
builder.HasIndex(x => x.Type).IsUnique();
18+
public class AchievementConfiguration : IEntityTypeConfiguration<Achievement>
19+
{
20+
public void Configure(EntityTypeBuilder<Achievement> builder)
21+
{
22+
builder.HasKey(x => x.Type);
23+
builder.HasIndex(x => x.Type).IsUnique();
2424

25-
builder.Property(x => x.RewardType).IsRequired();
26-
builder.Property(x => x.RewardNumber).IsRequired();
27-
builder.Property(x => x.Points).IsRequired();
28-
builder.Property(x => x.CreatedAt).IsRequired();
29-
}
30-
}
25+
builder.Property(x => x.RewardType).IsRequired();
26+
builder.Property(x => x.RewardNumber).IsRequired();
27+
builder.Property(x => x.Points).IsRequired();
28+
builder.Property(x => x.CreatedAt).IsRequired();
29+
}
30+
}
3131
}

Disfarm.Data/Entities/Banner.cs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@
66

77
namespace Disfarm.Data.Entities
88
{
9-
public class Banner : IUniqueIdentifiedEntity, INamedEntity, IPricedEntity, ICreatedEntity, IUpdatedEntity
10-
{
11-
public Guid Id { get; set; }
12-
public string Name { get; set; }
13-
public BannerRarity Rarity { get; set; }
14-
public uint Price { get; set; }
15-
public string Url { get; set; }
16-
public DateTimeOffset CreatedAt { get; set; }
17-
public DateTimeOffset UpdatedAt { get; set; }
18-
}
19-
20-
public class BannerConfiguration : IEntityTypeConfiguration<Banner>
21-
{
22-
public void Configure(EntityTypeBuilder<Banner> builder)
23-
{
24-
builder.HasKey(x => x.Id);
25-
builder.HasIndex(x => x.Name).IsUnique();
9+
public class Banner : IUniqueIdentifiedEntity, INamedEntity, IPricedEntity, ICreatedEntity, IUpdatedEntity
10+
{
11+
public Guid Id { get; set; }
12+
public string Name { get; set; }
13+
public BannerRarity Rarity { get; set; }
14+
public uint Price { get; set; }
15+
public string Url { get; set; }
16+
public DateTimeOffset CreatedAt { get; set; }
17+
public DateTimeOffset UpdatedAt { get; set; }
18+
}
2619

27-
builder.Property(x => x.Id).IsRequired().ValueGeneratedNever();
28-
builder.Property(x => x.Name).IsRequired();
29-
builder.Property(x => x.Rarity).IsRequired();
30-
builder.Property(x => x.Price).IsRequired();
31-
builder.Property(x => x.Url).IsRequired();
32-
builder.Property(x => x.CreatedAt).IsRequired();
33-
builder.Property(x => x.UpdatedAt).IsRequired();
34-
}
35-
}
20+
public class BannerConfiguration : IEntityTypeConfiguration<Banner>
21+
{
22+
public void Configure(EntityTypeBuilder<Banner> builder)
23+
{
24+
builder.HasKey(x => x.Id);
25+
builder.HasIndex(x => x.Name).IsUnique();
26+
27+
builder.Property(x => x.Id).IsRequired().ValueGeneratedNever();
28+
builder.Property(x => x.Name).IsRequired();
29+
builder.Property(x => x.Rarity).IsRequired();
30+
builder.Property(x => x.Price).IsRequired();
31+
builder.Property(x => x.Url).IsRequired();
32+
builder.Property(x => x.CreatedAt).IsRequired();
33+
builder.Property(x => x.UpdatedAt).IsRequired();
34+
}
35+
}
3636
}

Disfarm.Data/Entities/Crop.cs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@
55

66
namespace Disfarm.Data.Entities
77
{
8-
public class Crop : IUniqueIdentifiedEntity, INamedEntity, IPricedEntity, ICreatedEntity, IUpdatedEntity
9-
{
10-
public Guid Id { get; set; }
11-
public string Name { get; set; }
12-
public uint Price { get; set; }
13-
public DateTimeOffset CreatedAt { get; set; }
14-
public DateTimeOffset UpdatedAt { get; set; }
15-
16-
public Guid SeedId { get; set; }
17-
public Seed Seed { get; set; }
18-
}
8+
public class Crop : IUniqueIdentifiedEntity, INamedEntity, IPricedEntity, ICreatedEntity, IUpdatedEntity
9+
{
10+
public Guid Id { get; set; }
11+
public string Name { get; set; }
12+
public uint Price { get; set; }
13+
public DateTimeOffset CreatedAt { get; set; }
14+
public DateTimeOffset UpdatedAt { get; set; }
1915

20-
public class CropConfiguration : IEntityTypeConfiguration<Crop>
21-
{
22-
public void Configure(EntityTypeBuilder<Crop> builder)
23-
{
24-
builder.HasKey(x => x.Id);
25-
builder.HasIndex(x => x.Name).IsUnique();
16+
public Guid SeedId { get; set; }
17+
public Seed Seed { get; set; }
18+
}
2619

27-
builder.Property(x => x.Id).IsRequired().ValueGeneratedNever();
28-
builder.Property(x => x.Name).IsRequired();
29-
builder.Property(x => x.Price).IsRequired();
30-
builder.Property(x => x.CreatedAt).IsRequired();
31-
builder.Property(x => x.UpdatedAt).IsRequired();
20+
public class CropConfiguration : IEntityTypeConfiguration<Crop>
21+
{
22+
public void Configure(EntityTypeBuilder<Crop> builder)
23+
{
24+
builder.HasKey(x => x.Id);
25+
builder.HasIndex(x => x.Name).IsUnique();
3226

33-
builder
34-
.HasOne(x => x.Seed)
35-
.WithOne(x => x.Crop)
36-
.HasForeignKey<Crop>(x => x.SeedId);
37-
}
38-
}
27+
builder.Property(x => x.Id).IsRequired().ValueGeneratedNever();
28+
builder.Property(x => x.Name).IsRequired();
29+
builder.Property(x => x.Price).IsRequired();
30+
builder.Property(x => x.CreatedAt).IsRequired();
31+
builder.Property(x => x.UpdatedAt).IsRequired();
32+
33+
builder
34+
.HasOne(x => x.Seed)
35+
.WithOne(x => x.Crop)
36+
.HasForeignKey<Crop>(x => x.SeedId);
37+
}
38+
}
3939
}

0 commit comments

Comments
 (0)