Initial code commit.

This commit is contained in:
2026-02-03 10:44:31 +08:00
parent 8927c5ae0e
commit d69fe2cc1f
99 changed files with 10839 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
using System;
namespace Sufi.Demo.PeopleDirectory.Domain.Common
{
public abstract class AuditableEntity<TId> : IAuditableEntity<TId>
{
public TId Id { get; set; } = default!;
public string? CreatedBy { get; set; }
public DateTime CreatedOn { get; set; }
public string? LastModifiedBy { get; set; }
public DateTime? LastModifiedOn { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
namespace Sufi.Demo.PeopleDirectory.Domain.Common
{
public interface IAuditableEntity<TId> : IAuditableEntity, IEntity<TId>
{
}
public interface IAuditableEntity : IEntity
{
string? CreatedBy { get; set; }
DateTime CreatedOn { get; set; }
string? LastModifiedBy { get; set; }
DateTime? LastModifiedOn { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace Sufi.Demo.PeopleDirectory.Domain.Common
{
public interface IEntity
{
}
public interface IEntity<TId> : IEntity
{
[Key]
TId Id { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
using Sufi.Demo.PeopleDirectory.Domain.Common;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Sufi.Demo.PeopleDirectory.Domain.Entities.Misc
{
public class Contact : AuditableEntity<int>
{
[Required]
[Column(TypeName = "character varying(50)")]
public string UserName { get; set; } = null!;
[Required]
[Phone]
[Column(TypeName = "character varying(20)")]
public string Phone { get; set; } = null!;
[Required]
[EmailAddress]
[Column(TypeName = "character varying(100)")]
public string Email { get; set; } = null!;
[Required]
[Column(TypeName = "character varying(255)")]
public string SkillSets { get; set; } = null!;
[Required]
[Column(TypeName = "character varying(255)")]
public string Hobby { get; set; } = null!;
}
}

View File

@@ -0,0 +1,13 @@
using Sufi.Demo.PeopleDirectory.Domain.Common;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Sufi.Demo.PeopleDirectory.Domain.Entities.Misc
{
public class ServerInfo : AuditableEntity<string>
{
[Required]
[Column(TypeName = "character varying(255)")]
public string Value { get; set; } = null!;
}
}

View File

@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>