FIC_Solar/SolarPower/Models/MyBaseModel.cs
2021-06-09 15:03:24 +08:00

48 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SolarPower.Models
{
/// <summary>
/// 基礎BaseModel
/// </summary>
public class MyBaseModel
{
public int Id { get; set; } //編號
}
public class Created
{
private string createdAt;
public int CreatedBy { get; set; } //創建者
public string CreatedAt { get { return Convert.ToDateTime(createdAt).ToString("yyyy-MM-dd HH:mm:ss"); } set { createdAt = value; } } //創建時間
}
public class Updated : MyBaseModel
{
private string updatedAt;
public int UpdatedBy { get; set; } //修改者
public string UpdatedAt { get { return Convert.ToDateTime(updatedAt).ToString("yyyy-MM-dd HH:mm:ss"); } set { updatedAt = value; } } //修改時間
}
/// <summary>
/// 當前登入的使用者基本資訊
/// </summary>
public class MyUser
{
public int Id { get; set; } //編號
public MyCompany Company { get; set; } //公司資訊
}
/// <summary>
/// 當前登入使用者的公司資訊
/// </summary>
public class MyCompany
{
}
}