110 lines
3.3 KiB
C#
110 lines
3.3 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SolarPower.Models.Company
|
|
{
|
|
public enum CompanyStatusEnum : byte
|
|
{
|
|
Suspend = 0, //停權
|
|
Normal = 1, //正常
|
|
}
|
|
public class Company : Created
|
|
{
|
|
public int Id { get; set; }
|
|
public byte Deleted { get; set; }
|
|
public byte Status { get; set; }
|
|
public string Name { get; set; }
|
|
public string Logo { get; set; }
|
|
public string TaxIDNumber { get; set; } //統一編號
|
|
public string Phone { get; set; }
|
|
public string Address { get; set; }
|
|
public int RegisterUpperLimit { get; set; } //註冊上限
|
|
}
|
|
|
|
/// <summary>
|
|
/// 公司管理 - DataTable
|
|
/// </summary>
|
|
public class CompanyDataTable : Company
|
|
{
|
|
public string RegisterRatio { get; set; } // 註冊數量 / 註冊上限
|
|
public string Function { get; set; } // DataTable Function col
|
|
public int SPStationAmount { get; set; } //太陽能電站數量
|
|
}
|
|
|
|
public class SimpleCompany
|
|
{
|
|
public int Id { get; set; }
|
|
public byte Deleted { get; set; }
|
|
public byte Status { get; set; }
|
|
public string Name { get; set; }
|
|
public string Logo { get; set; }
|
|
}
|
|
|
|
public class UpdateCompany : Updated
|
|
{
|
|
public string Name { get; set; } //名稱
|
|
public byte Status { get; set; } //狀態
|
|
public string Logo { get; set; }
|
|
public string TaxIDNumber { get; set; } //統一編號
|
|
public string Phone { get; set; } //電話
|
|
public string Address { get; set; }
|
|
public int RegisterUpperLimit { get; set; } //註冊上限
|
|
}
|
|
|
|
public class PostCompanyFilter
|
|
{
|
|
public int SelectedCompanyId { get; set; } //選擇的公司編號
|
|
public string Name { get; set; } //公司名稱
|
|
public string Phone { get; set; } //電話
|
|
public string TaxIDNumber { get; set; } //統一編號
|
|
}
|
|
|
|
/// <summary>
|
|
/// 公司列表下拉選單
|
|
/// </summary>
|
|
public class CompanySelectItemList
|
|
{
|
|
public string Text { get; set; }
|
|
public string Value { get; set; }
|
|
}
|
|
|
|
public class PostCompany
|
|
{
|
|
public int Id { get; set; } //編號
|
|
public string Name { get; set; } //名稱
|
|
public string TaxIDNumber { get; set; } //統一編號
|
|
//public byte Status { get; set; } //狀態
|
|
public string Phone { get; set; } //手機
|
|
public string Address { get; set; } //地址
|
|
public int RegisterUpperLimit { get; set; } //註冊上限
|
|
public IFormFile LogoFile { get; set; } //公司logo
|
|
}
|
|
|
|
/// <summary>
|
|
/// 公司權限池
|
|
/// </summary>
|
|
public class CompanyAuthDataTable
|
|
{
|
|
public string AuthCode { get; set; }
|
|
public string MainName { get; set; }
|
|
public string SubName { get; set; }
|
|
public string ControlName { get; set; }
|
|
public byte CheckAuth { get; set; }
|
|
}
|
|
|
|
public class PostCompanyAuth
|
|
{
|
|
public int SelectedCompanyId { get; set; }
|
|
public List<string> CheckAuths { get; set; }
|
|
}
|
|
|
|
public class CompanyAuth : Created
|
|
{
|
|
public int CompanyId { get; set; }
|
|
public string AuthCode { get; set; }
|
|
}
|
|
}
|