115 lines
3.6 KiB
C#
115 lines
3.6 KiB
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Reflection.Emit;
|
|
using System.Runtime.Serialization;
|
|
using System.Web.Http;
|
|
|
|
namespace Model
|
|
{
|
|
// 為對應資料表MODEL宣告額外參數類別(Metadata)
|
|
// [JsonIgnore] 避免WEBAPI自動抓關聯資料
|
|
[MetadataType(typeof(activityMetadata))]
|
|
public partial class activity
|
|
{
|
|
private class activityMetadata
|
|
{
|
|
[JsonIgnore]
|
|
public virtual activity_kind activity_kind { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public virtual activity_category_kind activity_category_kind { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public virtual ICollection<activity_relating> activity_relating { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public virtual ICollection<activity_spares> activity_spares { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<activity_check> activity_check { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<news> news { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<pro_order> pro_order { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<stock> stocks { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<accounting> accountings { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<transfer_register> transfer_register { get; set; }
|
|
|
|
|
|
}
|
|
public const int KindLevelMax = 3; //活動分類頁面層數
|
|
public const int ItemLevelMax = 3; //項目類別頁面層數
|
|
|
|
public enum category : int
|
|
{
|
|
[Description("報名項目")]
|
|
SignUp = 1,
|
|
[Description("掛單項目")]
|
|
Order = 2,
|
|
[Description("備品項目")]
|
|
Spares = 3,
|
|
[Description("贊助項目")]
|
|
Patronize = 4
|
|
}
|
|
|
|
|
|
}
|
|
|
|
[MetadataType(typeof(actItemMetadata))]
|
|
public partial class actItem
|
|
{
|
|
private class actItemMetadata
|
|
{
|
|
[JsonIgnore]
|
|
public virtual actItem_kind actItem_kind { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<actItem_files> actItem_files { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<activity_kind_detail> activity_kind_detail { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<activity_relating> activity_relating { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<activity_spares> activity_spares { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<pro_order_detail> pro_order_detail { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<project> projects { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<stock> stocks { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<act_bom> act_bom { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<transfer_register> transfer_register { get; set; }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[MetadataType(typeof(activity_checkMetadata))]
|
|
public partial class activity_check
|
|
{
|
|
private class activity_checkMetadata
|
|
{
|
|
|
|
}
|
|
|
|
public enum keyin1 : int
|
|
{
|
|
[Description("報到")]
|
|
CheckIn = 1,
|
|
[Description("離開")]
|
|
CheckOut = 2
|
|
}
|
|
|
|
}
|
|
}
|
|
|