(self, context: &EntityWriterContext)
| 203 | |
| 204 | impl EntityWriter { |
| 205 | pub fn generate(self, context: &EntityWriterContext) -> WriterOutput { |
| 206 | let mut files = Vec::new(); |
| 207 | files.extend(self.write_entities(context)); |
| 208 | let with_prelude = context.with_prelude != WithPrelude::None; |
| 209 | files.push(self.write_index_file(context.lib, with_prelude, context.seaography)); |
| 210 | if with_prelude { |
| 211 | files.push(self.write_prelude(context.with_prelude, context.frontend_format)); |
| 212 | } |
| 213 | if !self.enums.is_empty() { |
| 214 | files.push(self.write_sea_orm_active_enums( |
| 215 | &context.with_serde, |
| 216 | context.with_copy_enums, |
| 217 | &context.enum_extra_derives, |
| 218 | &context.enum_extra_attributes, |
| 219 | context.frontend_format, |
| 220 | )); |
| 221 | } |
| 222 | WriterOutput { files } |
| 223 | } |
| 224 | |
| 225 | pub fn write_entities(&self, context: &EntityWriterContext) -> Vec<OutputFile> { |
| 226 | self.entities |
no test coverage detected