Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.17 KB | None | 0 0
  1. package team.creatif;
  2.  
  3. public class Constants {
  4.  
  5.  
  6.     // Configurations
  7.     public static final String DatabaseURL = "jdbc:mysql://localhost:3306/keydriver?useSSL=false&useUnicode=yes&characterEncoding=UTF-8";
  8.     public static final String DatabaseUsername = "root";
  9.     public static final String DatabasePassword = "1234";
  10.     public static final String DateFormat = "yyyy-MM-dd HH:mm:ss";
  11.  
  12.     //INFO
  13.     public static final double showRadius = 10.1;
  14.     public static final int drivers_distribute_time = 10000;
  15.  
  16.     // Driver offer request types
  17.     public class DriverTypes {
  18.         static final int WITH_OVERDRAFT = 0;
  19.         static final int WITHOUT_OVERDRAFT = 1;
  20.     }
  21.  
  22.     public class Methods {
  23.         public static final int REQUEST_TYPE_AUTH = 0;
  24.         public static final int REQUEST_TYPE_GET_INFO = 1;
  25.         public static final int REQUEST_TYPE_GET_CARS = 2;
  26.         public static final int UPDATE_DRIVER_LOCATION = 3;
  27.         public static final int REQUEST_USER_CREATE_ORDER = 4;
  28.         public static final int REQUEST_TYPE_GET_ORDERS = 5;
  29.         public static final int REQUEST_TYPE_GET_ONE_ORDER = 6;
  30.         public static final int REQUEST_TYPE_DRIVER_CLOSE_ORDER = 7;
  31.         public static final int REQUEST_GET_CURRENT_SCENE = 8;
  32.         public static final int REQUEST_UPGRADE_ORDER_PRICE = 9;
  33.         public static final int REQUEST_CANCEL_ORDER = 10;
  34.         public static final int REQUEST_DRIVER_REACHED = 11;
  35.     }
  36.  
  37.     public class Commands {
  38.         public static final int UNKNOWN = 0;
  39.         public static final int DRIVER_HAS_BEEN_CHANGE_LOCATION = 1;
  40.         public static final int NEW_ORDER = 2;
  41.         public static final int CHANGE_MAIN_SCENE = 8;
  42.         public static final int ORDER_CHANGED = 9;
  43.         public static final int ORDER_REMOVED = 10;
  44.         public static final int DRIVER_CHANGED_LOCATION_FOR_ORDER = 11;
  45.     }
  46.  
  47.     // ERRORS CODES
  48.     public class Errors {
  49.         public static final int UNKNOWN = 0;
  50.         public static final int INCORRECT_TOKEN = 1;
  51.         public static final int SQL_EXCEPTION = 2;
  52.         public static final int INCORRECT_JSON = 3;
  53.         public static final int INCORRECT_CONFIRM_CODE = 4;
  54.         public static final int SYSTEM_ERROR = 5;
  55.         public static final int USER_HAS_BEEN_LISTEN = 6;
  56.         public static final int DRIVER_HAS_BEEN_LISTEN_ORDERS = 7;
  57.         public static final int ACCESS_DENIED_FOR_DRIVER = 8;
  58.         public static final int NO_SUCH_METHOD = 9;
  59.     }
  60.  
  61.     // CODES
  62.     public class Codes {
  63.         public static final int ALL_OK = 0;
  64.     }
  65.  
  66.     public class Scenes {
  67.         /*
  68.         USER SCENES
  69.         0 - Нет действий
  70.         1 - Заказал такси
  71.         2 - Ждет такси
  72.         3 - Едет в такси
  73.         4 - Поставить оценку
  74.  
  75.          */
  76.         public static final int USER_MAIN_SCENE = 0;
  77.         public static final int USER_WAIT_ORDER_PICKUP = 1;
  78.         public static final int USER_WAIT_CAR = 2;
  79.         public static final int USER_IN_CAR = 3;
  80.         public static final int USER_SET_RATE = 4;
  81.         public static final int DRIVER_MOVE_TO_ORDER = 5;
  82.     }
  83.  
  84.  
  85.  
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement