|
|
|
@ -30,25 +30,27 @@ namespace ET
|
|
|
|
|
{ |
|
|
|
|
public static void FromMessage(this Farmland self, FarmlandProto farmlandProto) |
|
|
|
|
{ |
|
|
|
|
self.Id = farmlandProto.id; |
|
|
|
|
self.Id = farmlandProto.Id; |
|
|
|
|
self.CropCfgId = farmlandProto.CropCfgId; |
|
|
|
|
self.Duration = farmlandProto.Duration; |
|
|
|
|
self.ExProduct = farmlandProto.ExProduct; |
|
|
|
|
self.PlanCropCfgId = farmlandProto.PlantCfgId; |
|
|
|
|
self.FarmlandState = farmlandProto.FarmlandState; |
|
|
|
|
self.PeopleId = farmlandProto.PeopleId; |
|
|
|
|
self.CabinId = farmlandProto.CabinId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static FarmlandProto ToMessage(this Farmland self) |
|
|
|
|
{ |
|
|
|
|
FarmlandProto proto = new FarmlandProto(); |
|
|
|
|
proto.id = self.Id; |
|
|
|
|
proto.Id = self.Id; |
|
|
|
|
proto.CropCfgId = self.CropCfgId; |
|
|
|
|
proto.Duration = self.Duration; |
|
|
|
|
proto.ExProduct = self.ExProduct; |
|
|
|
|
proto.PlantCfgId = self.PlanCropCfgId; |
|
|
|
|
proto.FarmlandState = self.FarmlandState; |
|
|
|
|
proto.PeopleId = self.PeopleId; |
|
|
|
|
proto.CabinId = self.CabinId; |
|
|
|
|
|
|
|
|
|
return proto; |
|
|
|
|
} |
|
|
|
|