using Newtonsoft.Json; using OfficeOpenXml.Attributes; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ARW.Model.Models.Business { [SugarTable("tb_student")] public class Student : BusinessBase { /// /// 学生id /// [JsonConverter(typeof(ValueToStringConverter))] [SugarColumn(IsPrimaryKey = true, ColumnName = "student_id")] public long StudentId { get; set; } /// /// 班级guid(外键) /// [JsonConverter(typeof(ValueToStringConverter))] [SugarColumn(ColumnDescription = "班级guid(外键)", ColumnName = "class_guid")] public long ClassId { get; set; } /// /// 字典类型(外键) /// [SugarColumn(ColumnDescription = "字典类型(外键)", IsNullable = true, ColumnName = "dictType")] public string DictType { get; set; } /// /// 学生名称 /// [SugarColumn(ColumnDescription = "学生名称", IsNullable = true, ColumnName = "student_name")] public string StudentName { get; set; } /// /// 性别(1:男,2:女) /// [SugarColumn(Length = 1, ColumnDescription = "性别(1:男,2:女)", IsNullable = true, ColumnName = "student_sex")] public string Sex { get; set; } /// /// 年龄 /// [SugarColumn(ColumnDescription = "年龄", IsNullable = true, ColumnName = "student_age")] public int? Age { get; set; } /// /// 学生图片(路径) /// [SugarColumn(ColumnDescription = "学生图片", IsNullable = true, ColumnName = "student_img")] public string StudentImg { get; set; } /// /// 学生标签(单个字段,以","分开) /// [SugarColumn(ColumnDescription = "学生标签", IsNullable = true, ColumnName = "student_tag")] public string StudentTag { get; set; } /// /// 学生服务(json) /// [SugarColumn(ColumnDescription = "学生服务", ColumnDataType = "text", IsNullable = true, ColumnName = "student_service", IsJson = true)] public Service[] StudentService { get; set; } /// /// 学生描述(富文本) /// [SugarColumn(ColumnDescription = "学生描述", ColumnDataType = "text", IsNullable = true, ColumnName = "student_describe")] public string StudentDescribe { get; set; } } public class Service { public string service_name { get; set; } public string service_price { get; set; } } }