First off: why do you want to draw it in UML? If you already have an ERD, what additional/alternate property do you want to illustrate with a UML class diagram that the ERD doesn't give you?
Why? Because UML is a tool. On the assumption the diagram is for human consumption only (i.e. you're not code generating from it) then you should use UML to expose the information you're trying to communicate.
As a general standard UML says nothing about how you formalise identity (PK/FK). UML follows the OO idiom that every object has implicit identity - therefore you don't need to specify it explicitly. So in the simplest case, you could:
- list PK attributes as normal attributes;
- ignore FK attributes altogether.
If that meets your modelling needs then you're done.
As a second refinement, you could tag the PK attributes with an ocl isUnique()
constraint, again ignoring the FKs.
Another option would be to use the rules of Executable UML. It denotes both PKs ('Identifiers'} and FKs ('referential attributes'} directly on the class diagram. So it's closest to capturing everything in the ERD.
So in summary: there is no UML-imposed right answer. It all depends on what you want to communicate with the diagram.