38 lines
1.0 KiB
C#
38 lines
1.0 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(newsMetadata))]
|
|
public partial class news
|
|
{
|
|
private class newsMetadata
|
|
{
|
|
[JsonIgnore]
|
|
public virtual admin admin { get; set; }
|
|
[JsonIgnore]
|
|
public virtual ICollection<news_files> news_files { get; set; }
|
|
[JsonIgnore]
|
|
public virtual news_kind news_kind { get; set; }
|
|
}
|
|
|
|
public const int KindLevelMax = 3; //頁面層數
|
|
public const string Dir = "~/upload/news"; //圖片上傳位置
|
|
public string log;
|
|
|
|
|
|
}
|
|
}
|
|
|