IM/backend/IM_API/Models/Permission.cs

45 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace IM_API.Models;
[Table("permissions")]
[MySqlCharSet("utf8mb4")]
[MySqlCollation("utf8mb4_general_ci")]
public partial class Permission
{
[Key]
[Column("ID", TypeName = "int(11)")]
public int Id { get; set; }
/// <summary>
/// 权限类型(0:增,1:删,2:改,3:查)
/// </summary>
[Column("PType", TypeName = "int(11)")]
public int Ptype { get; set; }
/// <summary>
/// 权限名称
/// </summary>
[StringLength(50)]
public string Name { get; set; } = null!;
/// <summary>
/// 权限编码
/// </summary>
[Column(TypeName = "int(11)")]
public int Code { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column(TypeName = "datetime")]
public DateTime Created { get; set; }
[InverseProperty("PermissionldNavigation")]
public virtual ICollection<Permissionarole> Permissionaroles { get; set; } = new List<Permissionarole>();
}