This is not rocket science, I expect you can work it out.
My trailer has a male RV 30A 3 blade connector (actually 2 blades and a pin). The generator
has either a couple 15A normal household receptacles or a 30A receptacle which is what I call a marine connector which has three sockets in a circular orientation, one of which has a little 90 degree bend radially inwards. If the blade has an outward bend to one or two of the three blades it's a 50A. Marine joins are made to rotate (clockwise) just a little bit to secure the connection.
I think that the simplest thing to do is to just plug your trailer into the generator
then find an appropriate adapter. Let the trailer's converter/charger recharge the battery.
Your choice of words makes me think you've installed one of those marine plug style fittings on the outside of your trailer and you carry your cord as a detached item. Therefore you'd need a 30A female plug at one end (trailer side) and some combinations of extension end or adapter with a male 30A RV cord at the other end (for campground power use) and perhaps a male 15A household and/or generator
use and/or male marine 30A plug depending on what sort of receptacle your generator has.
Make a simple sketch. Make a sketch with the trailer side and the intended power source side, label the joins with amps and gender, Sort though what the intermediate joins look like. Mine starts (at the trailer side) with RV30Male and ends with the campsite power post which is RV30Female. So I need some cord/adapter that's RV30Female for the trailer end and RV30Male at the post end. Make a sketch for everything you expect to hook up to.
My generator hook up looks like:
Trailer side, RV30Male to RV30Female to 15AMale
to 15AFemale @ generator. So I have an RV30Female to 15AMale adapter
Over the years I've picked up a number of adapters:
RV30Female to 15AMale
(I think I have 2 of these because I forgot to pack one and needed it.
RV30Female to RV50AMale
RV30Female to Marine30AMale
You can make it more complicated by plugging a dedicated charger into the generator. You wouldn't have AC in the trailer unless you were also using an inverter. Either way you would just match up the plugs with the appropriate adapter.
They make an adapter for pratically all combination of plugs. Park Power and Camco make a wide variety of adapters if it turns out you need one. Cabelas also sells a variety. This one adapts a 30a marine to 30a RV.
Camco RV Power-Converting Adapters : Cabela's
Places that sell generators also usually have a wide choice of adapters too. Just match up plug genders and go camping.
I'm not an electrician and I offer the above as a simplified overview. There are tons of exceptions. That's why electricians get so much training. There have been efforts to avoid missconnections by designing the plug patterns. Don't force something to fit.