Projekt

Obecné

Profil

« Předchozí | Další » 

Revize d66db8fe

Přidáno uživatelem Milan Hotovec před téměř 4 roky(ů)

data entities prepared
refs #8555 @2h
@testFull

Zobrazit rozdíly:

src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Class1.cs
1
using System;
2

  
3
namespace Leuze.Modules.Goal.Domain
4
{
5
    public class Class1
6
    {
7
    }
8
}
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/Comment.cs
1
using Leuze.Core.Domain.Domains;
2
using Leuze.Core.Domain.Domains.Users;
3
using System;
4
using System.Collections.Generic;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8

  
9
namespace Leuze.Modules.Goal.Domain.Domains
10
{
11
    public class Comment : BaseEntity
12
    {
13
        private Comment()
14
        {
15

  
16
        }
17

  
18
        public Comment(DomainUser creator, Goal goal, string text, bool isPrivate)
19
        {
20
            this.Creator = creator;
21
            this.CreatorId = creator.UserId;
22
            this.Goal = goal;
23
            this.GoalId = goal.Id;
24
            this.Text = text;
25
            this.IsPrivate = isPrivate;
26
        }
27

  
28
        public Guid Id { get; private set; }
29
        public DomainUser Creator { get; private set; }
30
        public Guid CreatorId { get; private set; }
31
        public Goal Goal { get; private set; }
32
        public Guid GoalId { get; private set; }
33
        public string Text { get; private set; }
34
        public bool IsPrivate { get; private set; }
35
        public bool IsChanged { get; private set; }
36
    }
37
}
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/Goal.cs
1
using Leuze.Core.Domain.Domains;
2
using Leuze.Core.Domain.Domains.Users;
3
using System;
4
using System.Collections.Generic;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8

  
9
namespace Leuze.Modules.Goal.Domain.Domains
10
{
11
    public class Goal : BaseEntity
12
    {
13
        private Goal()
14
        {
15

  
16
        }
17

  
18
        public Goal(GoalDefinition goalDefinition, DomainUser creator, string name, string description)
19
        {
20
            this.GoalDefinition = goalDefinition;
21
            this.GoalDefinitionId = goalDefinition.Id;
22
            this.Creator = creator;
23
            this.CreatorId = creator.UserId;
24
            this.Name = name;
25
            this.Description = description;
26
        }
27

  
28
        public Guid Id { get; private set; }
29
        public GoalDefinition GoalDefinition { get; private set; }
30
        public Guid GoalDefinitionId { get; private set; }
31
        public DomainUser Creator { get; private set; }
32
        public Guid CreatorId { get; private set; }
33
        public string Name { get; private set; }
34
        public string Description { get; private set; }
35
        public int PercentileUser { get; private set; }
36
        public int PercentileFinal { get; private set; }
37
    }
38
}
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/GoalDefinition.cs
1
using Leuze.Core.Domain.Domains;
2
using Leuze.Core.Domain.Domains.Users;
3
using System;
4
using System.Collections.Generic;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8

  
9
namespace Leuze.Modules.Goal.Domain.Domains
10
{
11
    public class GoalDefinition : BaseEntity
12
    {
13

  
14
        private GoalDefinition()
15
        {
16

  
17
        }
18

  
19
        public GoalDefinition(DomainUser owner, DomainUser creator, string name, DateTime from, DateTime to)
20
        {
21
            this.Owner = owner;
22
            this.OwnerId = owner.UserId;
23
            this.Creator = creator;
24
            this.CreatorId = creator.UserId;
25
            this.Name = name;
26
            this.From = from;
27
            this.To = to;
28
        }
29

  
30
        public Guid Id { get; private set; }
31
        public DomainUser Owner { get; private set; }
32
        public Guid OwnerId { get; private set; }
33
        public DomainUser Creator { get; private set; }
34
        public Guid CreatorId { get; private set; }
35
        public string Name { get; private set; }
36
        public DateTime From { get; private set; }
37
        public DateTime To { get; private set; }
38
        public decimal Vari { get; private set; }
39
    }
40
}
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/GoalUpdate.cs
1
using Leuze.Core.Domain.Domains;
2
using Leuze.Core.Domain.Domains.Users;
3
using System;
4
using System.Collections.Generic;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8

  
9
namespace Leuze.Modules.Goal.Domain.Domains
10
{
11
    public class GoalUpdate : BaseEntity
12
    {
13
        private GoalUpdate()
14
        {
15

  
16
        }
17

  
18
        public GoalUpdate(DomainUser creator, Goal goal, UpdateType updatedType, string oldValue, string newValue)
19
        {
20
            this.Creator = creator;
21
            this.CreatorId = creator.UserId;
22
            this.Goal = goal;
23
            this.GoalId = goal.Id;
24
            this.UpdatedType = updatedType;
25
            this.OldValue = oldValue;
26
            this.NewValue = newValue;
27
        }
28

  
29
        public Guid Id { get; private set; }
30
        public DomainUser Creator { get; private set; }
31
        public Guid CreatorId { get; private set; }
32
        public Goal Goal { get; private set; }
33
        public Guid GoalId { get; private set; }
34
        public UpdateType UpdatedType { get; private set; }
35
        public string OldValue { get; private set; }
36
        public string NewValue { get; private set; }
37
    }
38
}
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/Review.cs
1
using Leuze.Core.Domain.Domains;
2
using Leuze.Core.Domain.Domains.Users;
3
using System;
4
using System.Collections.Generic;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8

  
9
namespace Leuze.Modules.Goal.Domain.Domains
10
{
11
    public class Review : BaseEntity
12
    {
13
        private Review()
14
        {
15

  
16
        }
17

  
18
        public Review(DomainUser creator, Goal goal, string commentCreator, string commentOwner, bool isFinal)
19
        {
20
            this.Creator = creator;
21
            this.CreatorId = creator.UserId;
22
            this.Goal = goal;
23
            this.GoalId = goal.Id;
24
            this.CommentCreator = commentCreator;
25
            this.CommentOwner = commentOwner;
26
            this.IsFinal = isFinal;
27
        }
28

  
29
        public Guid Id { get; private set; }
30
        public DomainUser Creator { get; private set; }
31
        public Guid CreatorId { get; private set; }
32
        public Goal Goal { get; private set; }
33
        public Guid GoalId { get; private set; }
34
        public string CommentOwner { get; private set; }
35
        public string CommentCreator { get; private set; }
36
        public bool IsFinal { get; private set; }
37
    }
38
}
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/UpdateType.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Leuze.Modules.Goal.Domain.Domains
8
{
9
    public enum UpdateType
10
    {
11
        Name, Description, PercentileUser, PercentileFinal
12
    }
13
}

Také k dispozici: Unified diff