29 lines
726 B
C#
29 lines
726 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
// 岗位部门数据
|
|
[System.Serializable]
|
|
public class PostDeptData:IEquatable<PostDeptData>
|
|
{
|
|
public string postName; // 岗位名称
|
|
|
|
// 实现IEquatable接口的Equals方法以及重写GetHashCode方法以及ToString方法
|
|
public bool Equals(PostDeptData other)
|
|
{
|
|
if (other is null) return false;
|
|
if (ReferenceEquals(this, other)) return true;
|
|
return postName == other.postName;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return HashCode.Combine(postName);
|
|
}
|
|
public override string ToString()
|
|
{
|
|
return $"岗位名称: {postName}";
|
|
}
|
|
}
|