CORD-2328 add policy_code field to user model

Change-Id: I7b35951318457b0cc63059b703f075ab96f0d5d9
(cherry picked from commit 708418bfd982cf6c468c28caca4e1122eaea06f6)
diff --git a/xos/core/models/core.xproto b/xos/core/models/core.xproto
index 8beff87..9184af9 100644
--- a/xos/core/models/core.xproto
+++ b/xos/core/models/core.xproto
@@ -63,6 +63,7 @@
      optional string enacted = 20 [db_index = False, null = True, content_type = "date", blank = False];
      optional string policed = 21 [db_index = False, null = True, content_type = "date", blank = False];
      required string backend_status = 22 [default = "Provisioning in progress", max_length = 1024, content_type = "stripped", blank = False, null = False, db_index = False];
+     required int32 backend_code = 34 [default = 0];
      required bool backend_need_delete = 23 [default = False, null = False, db_index = False, blank = True];
      required bool backend_need_reap = 24 [default = False, null = False, db_index = False, blank = True];
      required bool deleted = 25 [default = False, null = False, db_index = False, blank = True];
@@ -72,6 +73,7 @@
      required bool no_policy = 29 [default = False, null = False, db_index = False, blank = True];
      required string timezone = 30 [default = "America/New_York", max_length = 100, blank = False, null = False, db_index = False];
      optional string policy_status = 32 [default = "0 - Policy in process", max_length = 1024];
+     optional int32 policy_code = 35 [default = 0];
      required string leaf_model_name = 33 [null = False, max_length = 1024, help_text = "The most specialized model in this chain of inheritance, often defined by a service developer"];
 }
 
diff --git a/xos/core/models/user.py b/xos/core/models/user.py
index 596ac30..83595f9 100644
--- a/xos/core/models/user.py
+++ b/xos/core/models/user.py
@@ -155,6 +155,7 @@
     policed = models.DateTimeField(null=True, default=None)
     backend_status = StrippedCharField(max_length=1024,
                                        default="Provisioning in progress")
+    backend_code = models.IntegerField( default = 0, null = False )
     backend_need_delete = models.BooleanField(default=False)
     backend_need_reap = models.BooleanField(default=False)
     deleted = models.BooleanField(default=False)
@@ -168,6 +169,7 @@
     leaf_model_name = models.CharField( help_text = "The most specialized model in this chain of inheritance, often defined by a service developer", max_length = 1024, null = False )
 
     policy_status = models.CharField( default = "0 - Policy in process", max_length = 1024, null = True )
+    policy_code = models.IntegerField( default = 0, null = True )
 
     objects = UserManager()
     deleted_objects = DeletedUserManager()