BaseFilesPath returns the storage dir path used by the record.
()
| 601 | |
| 602 | // BaseFilesPath returns the storage dir path used by the record. |
| 603 | func (m *Record) BaseFilesPath() string { |
| 604 | id := cast.ToString(m.LastSavedPK()) |
| 605 | if id == "" { |
| 606 | id = m.Id |
| 607 | } |
| 608 | |
| 609 | return m.collection.BaseFilesPath() + "/" + id |
| 610 | } |
| 611 | |
| 612 | // Original returns a shallow copy of the current record model populated |
| 613 | // with its ORIGINAL db data state (aka. right after PostScan()) |