| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using Microsoft.EntityFrameworkCore;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace bitforum.Models.BBS
- {
- [Table("BoardGroup")]
- [Index(nameof(Code), Name = "IX_BoardGroup_Code")]
- [Index(nameof(Name), Name = "IX_BoardGroup_Name")]
- [Index(nameof(Order), Name = "IX_BoardGroup_Order")]
- [Index(nameof(Boards), Name = "IX_BoardGroup_Boards")]
- [Index(nameof(Posts), Name = "IX_BoardGroup_Posts")]
- [Index(nameof(Comments), Name = "IX_BoardGroup_Comments")]
- public class BoardGroup
- {
- public virtual ICollection<Board> Board { get; set; } = new List<Board>();
- [Key]
- [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- [DisplayName("PK")]
- [Comment("PK")]
- public int ID { get; set; }
- [Required]
- [DisplayName("게시판 분류 주소")]
- [Comment("게시판 분류 주소")]
- [DataType(DataType.Text)]
- [StringLength(70)]
- public string Code { get; set; } = null!;
- [Required]
- [DisplayName("게시판 분류 명")]
- [Comment("게시판 분류 명")]
- [DataType(DataType.Text)]
- [StringLength(70)]
- public string Name { get; set; } = null!;
- [Required]
- [DisplayName("순서")]
- [Comment("순서")]
- public short Order { get; set; } = 0;
- [DisplayName("게시판 수")]
- [Comment("게시판 수")]
- public ushort Boards { get; set; } = 0;
- [DisplayName("게시글 수")]
- [Comment("게시글 수")]
- public uint Posts { get; set; } = 0;
- [DisplayName("댓글 수")]
- [Comment("댓글 수")]
- public uint Comments { get; set; } = 0;
- [DisplayName("수정 일시")]
- [Comment("수정 일시")]
- [DataType(DataType.DateTime)]
- public DateTime? UpdatedAt { get; set; } = null;
- [DisplayName("등록 일시")]
- [Comment("등록 일시")]
- [DataType(DataType.DateTime)]
- public DateTime CreatedAt { get; set; }
- }
- }
|