Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- import java.util.List;
- /**
- * Created by wojni on 10.03.2016.
- */
- public class users {
- long ID;
- string name;
- string surname;
- string email;
- string login;
- string md5pass;
- bool active;
- bool type; // 1 - pracownik wewnetrzny, 0 - pracownik zewnetrzny;
- List<role> roles = new ArrayList<>();
- List<project> projects = new ArrayList<>()
- public users(long id, string name, string surname, string email, string login, string md5pass, bool active, bool type)
- {
- this.ID = id;
- this.name = name;
- this.surname = surname;
- this.email = email;
- this.login = login;
- this.md5pass = md5pass;
- this.active = active;
- this.type = type;
- }
- public addRoleToUser(users user, role rola)
- {
- user.roles.add(rola);
- }
- public addProjectToUser(users user, project project)
- {
- user.projects.add(project);
- }
- }
- /////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class project {
- long ID;
- string name;
- string descritpion;
- string version;
- priority priority;
- public project(long id, string name, string desc, string version, priority priority)
- {
- this.ID = id;
- this.name = name;
- this.descritpion = desc;
- this.version = version;
- this.priority = priority;
- }
- }
- ///////////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class zgloszenie {
- long ID;
- //typ
- string description;
- priority priority;
- project project;
- public zgloszenie(long id, string description, priority priority, project project)
- {
- this.ID = id;
- this.description = description;
- this.priority = priority;
- this.project = project;
- }
- }
- ////////////////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class priority {
- long ID;
- string name;
- string responseTime;
- public priority(long id, string name, string responseTime)
- {
- this.ID = id;
- this.name = name;
- this.responseTime = responseTime;
- }
- }
- ///////////////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class role {
- long ID;
- string name;
- users user;
- public role(long id, string Name, users User)
- {
- this.ID = id;
- this.name = Name;
- this.user = User;
- }
- }
- /////////////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement