I can't define employee( x:empsex , y:approval ), types are not available.
Trying to use nested enums with struct.
public struct Employee {
public var empsex : Gender
public var approval : Eligible
public enum Gender : String{
case male = "MALE"
case female = "FEMALE"
public static var genderARR = ["MALE","FEMALE"]
}
public enum Eligible : Int {
case x = 1 //yes
case y = 0 //no
public static var eligibleARR = [1,0]
}
}
public struct Strofempoyestu {
public var empdata : [Employee]=[]
public init (){
for x in Employee.Gender.genderARR{
for y in Eemployee.Eligible.eligibleARR{
empdata.append(Employee( x:empsex , y:approval ))
}
}
}