Genesis Game Server Project Setup
This commit is contained in:
9
GameServer/Models/ApiResponse.cs
Normal file
9
GameServer/Models/ApiResponse.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace GameServer.Models
|
||||
{
|
||||
public class ApiResponse<T>
|
||||
{
|
||||
public T? Data { get; set; } // 실제 데이터 (단일 객체 혹은 리스트)
|
||||
public int? Count { get; set; } // 배열일 경우 개수 (선택사항)
|
||||
public string Message { get; set; } = "Success";
|
||||
}
|
||||
}
|
||||
17
GameServer/Models/CharacterModel.cs
Normal file
17
GameServer/Models/CharacterModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace GameServer.Models
|
||||
{
|
||||
[Table("tb_character")]
|
||||
public class CharacterModel
|
||||
{
|
||||
[Key]
|
||||
[Column("character_code")]
|
||||
public string CharacterCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[Column("character_type")]
|
||||
public string CharacterType { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
39
GameServer/Models/UserCharacterModel.cs
Normal file
39
GameServer/Models/UserCharacterModel.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace GameServer.Models
|
||||
{
|
||||
[Table("tb_user_characters")]
|
||||
public class UserCharacterModel
|
||||
{
|
||||
[Key]
|
||||
[Column("user_character_no")]
|
||||
public int UserCharacterNo { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("user_no")]
|
||||
public int UserNo { get; set; } = 0;
|
||||
|
||||
[Column("character_code")]
|
||||
public string CharacterCode { get; set; } = string.Empty;
|
||||
|
||||
[Column("lv")]
|
||||
public int Lv { get; set; } = 0;
|
||||
|
||||
[Column("str_stat")]
|
||||
public int StrStat { get; set; } = 0;
|
||||
|
||||
[Column("int_stat")]
|
||||
public int IntStat { get; set; } = 0;
|
||||
|
||||
[Column("max_hp")]
|
||||
public int MaxHp { get; set; } = 0;
|
||||
|
||||
[Column("max_mp")]
|
||||
public int MaxMp { get; set; } = 0;
|
||||
|
||||
[Column("default_control")]
|
||||
public bool DefaultControl { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user