Don't serialize Author + add SerializableAttributes

This commit is contained in:
smoogipoo 2017-12-07 15:32:39 +09:00
parent e573db04d4
commit 0ba8988580
2 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ using osu.Game.Rulesets;
namespace osu.Game.Beatmaps
{
[Serializable]
public class BeatmapInfo : IEquatable<BeatmapInfo>, IJsonSerializable, IHasPrimaryKey
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
@ -9,6 +10,7 @@ using osu.Game.Users;
namespace osu.Game.Beatmaps
{
[Serializable]
public class BeatmapMetadata
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
@ -51,6 +53,7 @@ namespace osu.Game.Beatmaps
/// The author of the beatmaps in this set.
/// </summary>
public User Author;
public bool ShouldSerializeAuthor() => false;
public string Source { get; set; }